WebDriverError:未知错误:Chrome无法启动:推进失败

时间:2018-08-03 11:23:40

标签: selenium-webdriver

我尝试了其他帖子中给出的所有建议,但似乎没有任何效果。以前,此配置工作已在Jenkins以及我的本地环境中进行,但现在我们必须从Jenkins迁移至推进,在这里我面临着这个问题。

我正在使用以下版本:
selenium-webdriver:3.6.0,
webdriver-manager:12.0.6,
grunt:0.4.4,
chromedriver:2.37

[4mRunning "protractor:test" (protractor) task[24m
[10:43:05] I/local - Starting selenium standalone server...
[10:43:05] I/launcher - Running 1 instances of WebDriver
[10:43:06] I/local - Selenium standalone server started at http://172.18.0.2:57579/wd/hub
Post stage
/jenkins/workspace/nonprod/protractoruitesting/node_modules/protractor/node_modules/selenium-webdriver/error.js:27
    super(opt_error);
    ^
WebDriverError: unknown error: Chrome failed to start: crashed
  (Driver info: chromedriver=2.37.544315 (730aa6a5fdba159ac9f4c1e8cbc59bf1b5ce12b7),platform=Linux 3.10.0-862.9.1.el7.x86_64 x86_64) (WARNING: The server did not provide any stacktrace information)

我正在使用的管道脚本命令

sh 'npm install'
sh 'npm install -g webdriver-manager'
sh 'cd ./node_modules/protractor/bin && node webdriver-manager clean'
sh 'cd ./node_modules/protractor/bin && node webdriver-manager update --versions.chrome 2.37'
sh 'cd ../../../'
echo "Starting X virtual framebuffer (Xvfb) in background..."
sh 'export DISPLAY=:0'
sh 'sudo Xvfb :0 -ac -screen 0 1024x768x24 &'
sh 'grunt test --conf=.pathto/conf.js --suite=suitename'

0 个答案:

没有答案