【发布时间】:2015-08-19 18:45:11
【问题描述】:
首先我收到以下错误:
org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
Error: no display specified
所以我使用export DISPLAY=:0 来规避这个问题。随后我发现 Selenium 测试正在使用 root 用户运行,一切都很好。
但是现在我可以看到当这些测试从 Jenkins 执行时出现以下错误:
org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
No protocol specified
Error: cannot open display: :0
我在 Redhat 6 机器上运行它。
【问题讨论】:
-
你能补充更多信息吗,什么操作系统?它是否在可以访问 X 会话的计算机和帐户上?