我正在使用 selenium html runner 来运行 selenise 脚本。
java -jar selenium-html-runner-3.0.1.jar -htmlSuite *firefox "https://www.google.com/" "D://file.html" "D://r.html"
在为任何浏览器运行时,我收到此错误堆栈:
Jan 09, 2017 4:14:47 PM org.openqa.selenium.server.htmlrunner.HTMLLauncher mainInt
WARNING: Test of browser failed: *firefox
java.io.IOException: java.lang.RuntimeException: java.net.BindException: Address already in use: JVM_Bind
at org.openqa.selenium.server.htmlrunner.HTMLLauncher.determineSuiteUrl(HTMLLauncher.java:180)
at org.openqa.selenium.server.htmlrunner.HTMLLauncher.runHTMLSuite(HTMLLauncher.java:108)
at org.openqa.selenium.server.htmlrunner.HTMLLauncher.mainInt(HTMLLauncher.java:245)
at org.openqa.selenium.server.htmlrunner.HTMLLauncher.main(HTMLLauncher.java:273)
Caused by: java.lang.RuntimeException: java.net.BindException: Address already in use: JVM_Bind
at org.openqa.selenium.net.PortProber.pollPort(PortProber.java:154)
at org.openqa.selenium.net.PortProber.pollPort(PortProber.java:137)
at org.openqa.selenium.server.htmlrunner.HTMLLauncher.determineSuiteUrl(HTMLLauncher.java:174)
... 3 more
Caused by: java.net.BindException: Address already in use: JVM_Bind
at java.net.DualStackPlainSocketImpl.bind0(Native Method)
at java.net.DualStackPlainSocketImpl.socketBind(DualStackPlainSocketImpl.java:106)
at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:387)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:190)
at java.net.Socket.bind(Socket.java:644)
at org.openqa.selenium.net.PortProber.pollPort(PortProber.java:146)
... 5 more
我正在使用 html runner 3、firefox 50、geckodriver 0.11