java -jar selenium-server-standalone-2.48.0.jar -htmlSuite *firefox http://localhost:8080/ F:\selenium\selenium-2.41.0\login_suite.html F:\selenium\selenium-2.41.0\results.html -port 4445
执行bat命令时一闪而过,就需要打开cmd将bat命令拖入其中执行
*注意要cd到该文件存在的目录下
执行后查看错误信息:
15:52:06.641 WARN - Failed to start: SocketListener0@0.0.0.0:4445
Exception in thread "main" java.net.BindException: Selenium is already running on port 4445. Or some other service is.
at org.openqa.selenium.server.SeleniumServer.start(SeleniumServer.java:479)
at org.openqa.selenium.server.SeleniumServer.boot(SeleniumServer.java:292)
at org.openqa.selenium.server.SeleniumServer.main(SeleniumServer.java:232)
at org.openqa.grid.selenium.GridLauncher.main(GridLauncher.java:64)
其实刚接触这个的时候完全不知道这是什么东西,然后在网上找了很久。
4445端口被占用
需要先kill掉这个端口