我在打开浏览器时遇到问题:
org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
关于它有什么解决方案吗?
您是否正在使用所需的功能来设置会话?
仅当我们使用所需的功能而不是ChrimeOptions时才会出现此错误。
在Selenium发行说明中提到,使用Selenium的当前实现,同时调用RemoteWebDriver支持ChromeOptions,如
webDriver = new RemoteWebDriver(new URL("http://yourIP:5555/wd/hub"), options);
而不是DesiredCapabilities
使其工作。
另外在jenkins slave机器上交叉检查防火墙相关的问题。
Chromedriver版本应为v17.0.963.0或之后。
希望它会对你有所帮助。