【发布时间】:2014-05-03 17:27:37
【问题描述】:
从 jenkins 运行 selenium 测试时,我收到此错误:
org.openqa.selenium.WebDriverException:未知错误:Chrome 启动失败:异常退出 (驱动信息:chromedriver=2.8.undefined,platform=Linux 3.13-1-686-pae x86)(警告:服务器没有提供任何堆栈跟踪信息) 命令持续时间或超时:20.54 秒 构建信息:版本:'2.33.0',修订:'4ecaf82108b2a6cc6f006aae81961236eba93358',时间:'2013-05-22 12:00:17' 系统信息:os.name:'Linux',os.arch:'i386',os.version:'3.13-1-686-pae',java.version:'1.6.0_45' 驱动程序信息:org.openqa.selenium.chrome.ChromeDriver在堆栈跟踪中进一步:
DEBUG - 发送请求:POST /session HTTP/1.1DEBUG - >> "POST /session HTTP/1.1[\r][\n]"
DEBUG - >> "接受:application/json, image/ png[\r][\n]"
DEBUG - >> "Content-Type: application/json; charset=utf-8[\r][\n]"
DEBUG - >> "Content-长度:143[\r][\n]"
DEBUG - >> "主机:localhost:30992[\r][\n]"
DEBUG - >> "连接:Keep-Alive[\r ][\n]"
DEBUG - >> "[\r][\n]"
DEBUG - >> POST /session HTTP/1.1
DEBUG - >> Accept: application/json, image /png
DEBUG - >> Content-Type: application/json; charset=utf-8
DEBUG - >> Content-Length: 143
DEBUG - >> Host: localhost:30992
DEBUG - >> Connection: Keep-Alive
DEBUG - >> "{ "desiredCapabilities":{"platform":"ANY","browserName":"chrome","chromeOptions":{"args":[],"extensions":[]},"version":"","chrome .switches":[]}}"
调试 - 调试 - DEBUG - DEBUG - 调试 - 调试 - 接收响应:HTTP/1.1 200 OK
调试 - 调试 - 调试 - DEBUG - DEBUG - DEBUG - 连接关闭
我不使用硒网格。
奇怪的是,我可以在直接向 chromedriver 发送命令时启动 chrome,如下所示:
curl -X POST -H "Content-Type: application/json; charset=utf-8" -d "{\"desiredCapabilities\":{\"platform\":\"ANY\",\"browserName\": \"chrome\",\"chromeOptions\":{\"args\":[],\"extensions\":[]},\"version\":\"\",\"chrome.switches\" :[]}}" 本地主机:9515/会话在此处打开 Chromimum 窗口。
我正在使用带有 aptitude 的 chromimum 和 chromedriver 的 Debian jessie(测试)。这是为了获得同质版本。
$ 谷歌浏览器版本 铬 33.0.1750.152 Debian jessie/sid ./chromedriver -v 在端口 9515 上启动 ChromeDriver (v2.8.undefined)我还为以前的 Debian 版本创建了另一个问题,您可以阅读以了解更多我之前尝试过的内容。 unknown error: Chrome failed to start: exited abnormally (Driver info: chromedriver=2.9
【问题讨论】:
-
您是否尝试使用无头铬?你的詹金斯服务器在 X 上吗?如果没有,您可以使用 X 帧缓冲区。
-
不只是普通的 chrome。 Jenkins 在带有 gnome 的笔记本电脑上运行。使用 x 帧缓冲区它可以工作,但无法理解为什么在我的情况下需要 xframebuffer。
-
我遇到了类似的问题,我在使用 x 帧缓冲区时遇到了同样的错误,还有其他建议吗?
-
我也是,同样的问题:(
-
试过更新你的 chrome 驱动了吗?
标签: google-chrome selenium jenkins hudson selenium-chromedriver