gpt4 book ai didi

google-chrome - WebDriverError : unknown error: Chrome failed to start: exited abnormally

转载 作者:行者123 更新时间:2023-12-04 13:00:05 30 4
gpt4 key购买 nike

我正在努力实现的目标
在 Ubuntu 14 non gui 上的 headless chrome 上成功运行我的 Protractor 测试。

设置
使用多个引用页面我设法成功安装:Xvfb Chrome 最新浏览器 Protractor 3.3.0 Java 7(也尝试使用 Java 8)并设置 LOCAL_HOME。此外,设法使用 this reference. 启动 Xvfb

Protractor 配置

exports.config = {
baseUrl: 'http://<qa environment>',
framework: 'jasmine',
seleniumAddress: 'http://localhost:4444/wd/hub',
jasmineNodeOpts: {
showColors:true,
defaultTimeoutInterval: 2500000
},
capabilities: {
'browserName': 'chrome'
},

specs: ['administration/*-spec.js'], //'signinandout/*-spec.js', 'homepage/*-spec.js',
onPrepare: function(){
//browser.driver.manage().window().setSize(1280, 1080);
}
}

异常堆栈跟踪:

/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/error.js:26 constructor(opt_error) { ^ WebDriverError: unknown error: Chrome failed to start: exited abnormally (Driver info: chromedriver=2.21.371461 (633e689b520b25f3e264a2ede6b74ccc23cb636a),platform=Linux 3.13.0-87-generic x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 60.16 seconds Build info: version: '2.52.0', revision: '4c2593c', time: '2016-02-11 19:06:42' System info: host: 'vagrant-ubuntu-trusty-64', ip: '10.0.2.15', os.name: 'Linux', os.arch: 'amd64', os.version: '3.13.0-87-generic', java.version: '1.7.0_101' Driver info: org.openqa.selenium.chrome.ChromeDriver at WebDriverError (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/error.js:26:26) at Object.checkLegacyResponse (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/error.js:580:13) at /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver.js:64:13 at Promise.invokeCallback_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:1329:14) at TaskQueue.execute_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2790:14) at TaskQueue.executeNext_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2773:21) at /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2652:27 at /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:639:7 at process._tickCallback (internal/process/next_tick.js:103:7) From: Task: WebDriver.createSession() at acquireSession (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver.js:62:22) at Function.createSession (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver.js:295:12) at Builder.build (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/builder.js:458:24) at Hosted.DriverProvider.getNewDriver (/usr/local/lib/node_modules/protractor/built/driverProviders/driverProvider.js:37:33) at Runner.createBrowser (/usr/local/lib/node_modules/protractor/built/runner.js:182:43) at /usr/local/lib/node_modules/protractor/built/runner.js:255:30 at _fulfilled (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:834:54) at self.promiseDispatch.done (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:863:30) at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:796:13) at /usr/local/lib/node_modules/protractor/node_modules/q/q.js:556:49 [01:09:14] E/launcher - Process exited with error code 1

最佳答案

检查您的 Google chrome 版本及其与 chrome 驱动程序的兼容性。

您可以从 Chromedriver 站点检查并下载兼容版本。

它对我有用。

关于google-chrome - WebDriverError : unknown error: Chrome failed to start: exited abnormally,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37692793/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com