如何在Jenkins上运行maven项目中的selenium testscripts( - eclipse - java - 并推送到git - )托管在不同的机器上

问题描述 投票:-1回答:1

我在打开浏览器时遇到问题:

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.

关于它有什么解决方案吗?

java maven selenium-webdriver jenkins-cli
1个回答
0
投票

您是否正在使用所需的功能来设置会话?

仅当我们使用所需的功能而不是ChrimeOptions时才会出现此错误。

在Selenium发行说明中提到,使用Selenium的当前实现,同时调用RemoteWebDriver支持ChromeOptions,如

webDriver = new RemoteWebDriver(new URL("http://yourIP:5555/wd/hub"), options); 

而不是DesiredCapabilities使其工作。

另外在jenkins slave机器上交叉检查防火墙相关的问题。

Chromedriver版本应为v17.0.963.0或之后。

希望它会对你有所帮助。

© www.soinside.com 2019 - 2024. All rights reserved.