【发布时间】:2020-02-25 21:53:41
【问题描述】:
我是硒的新手。能够在 Ubuntu 上配置 selenium。配置详细信息如下:
- 谷歌浏览器 68.0.3440.84
- ChromeDriver 2.41.578700 (2f1ed5f9343c13f73144538f15c00b370eda6706)
- 詹金斯版本。 2.193
- ubuntu-18.04
- 硒 3.13.0
- OpenJDK 1.8
- 硒设置参考文档:https://tecadmin.net/setup-selenium-chromedriver-on-ubuntu/
但是每次运行我都会在 jenkins 上遇到错误:
Opening chrome driver
Oct 30, 2019 1:26:49 PM org.openqa.selenium.remote.DesiredCapabilities chrome
INFO: Using `new ChromeOptions()` is preferred to `DesiredCapabilities.chrome()`
[ERROR] Tests run: 3, Failures: 1, Errors: 0, Skipped: 2, Time elapsed: 0.998 s <<< FAILURE! - in TestSuite
[ERROR] setUp(com.test.WebAppTitleTestOnChrome) Time elapsed: 0.895 s <<< FAILURE!
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.
请给我建议。
【问题讨论】:
-
检查您正在使用的浏览器版本和驱动程序版本。两者都应该与 Selenium 版本兼容。
标签: java selenium google-chrome jenkins selenium-chromedriver