【发布时间】:2018-11-20 13:39:30
【问题描述】:
Ubuntu - Ubuntu 中的 Jenkins 和 GIT, 使用 selenium 的 Java 项目
尝试在 Jenkins(带有代理节点的 Jenkins)中运行 GIT 项目。
Jenkins 中的错误
unknown error: Chrome failed to start: exited abnormally
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.41.578700 (2f1ed5f9343c13f73144538f15c00b370eda6706),platform=Linux 4.15.0-39-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 254 milliseconds
Build info: version: '3.11.0', revision: 'e59cfb3', time: '2018-03-11T20:26:55.152Z'
System info: host: 'WebTest-VM', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.15.0-39-generic', java.version: '1.8.0_191'
Driver info: driver.version: ChromeDriver
注意:相同的 java + Selenium 项目可以在本地机器上打开 chrome 浏览器
System.setProperty("webdriver.chrome.driver", "/home/webtest/Downloads/chromedriver");
WebDriver driver = new ChromeDriver();
【问题讨论】:
-
我找到了解决上述问题的方法,我的回答可能会帮助其他人将 chrome 驱动程序路径更改为 public static String chromeDriverPath = "/usr/bin/chromedriver"; System.setProperty("webdriver.chrome.driver", chromeDriverPath); WebDriver driver = new ChromeDriver();下面的教程解决了我的所有问题。 stgconsulting.com/…
标签: linux jenkins selenium-chromedriver