2017-08-22 45 views
2

當我使用webdriver-manager啓動命令來啓動服務器時,它給了我下面的錯誤。我安裝了量角器和webdriver管理器全球量角器 - webdriver-manager start給出(RunTimeException:java.net.BindException:地址已經在使用:綁定)

java.lang.RuntimeException: java.net.BindException: Address already in use: bind 
      at org.openqa.selenium.remote.server.SeleniumServer.boot(SeleniumServer.java:182) 
      at org.openqa.grid.selenium.GridLauncherV3$1.launch(GridLauncherV3.java:238) 
      at org.openqa.grid.selenium.GridLauncherV3.main(GridLauncherV3.java:99) 
    Caused by: java.net.BindException: Address already in use: bind 
      at sun.nio.ch.Net.bind0(Native Method) 
      at sun.nio.ch.Net.bind(Unknown Source) 
      at sun.nio.ch.Net.bind(Unknown Source) 
      at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source) 
      at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source) 
      at org.seleniumhq.jetty9.server.ServerConnector.open(ServerConnector.java:298) 
      at org.seleniumhq.jetty9.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80) 
      at org.seleniumhq.jetty9.server.ServerConnector.doStart(ServerConnector.java:236) 
      at org.seleniumhq.jetty9.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) 
      at org.seleniumhq.jetty9.server.Server.doStart(Server.java:431) 
      at org.seleniumhq.jetty9.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) 
      at org.openqa.selenium.remote.server.SeleniumServer.boot(SeleniumServer.java:180) 
      ... 2 more 

回答

1

通常,這將發生在端口已被使用。 Webdriver默認使用端口:4444。好像4444端口已在使用中。嘗試使用不同的端口。

可以開始網絡驅動程序與不同的端口使用以下命令:

webdriver-manager start --seleniumPort=XXXX e.g(4445)

相關問題