【发布时间】:2020-06-15 10:40:21
【问题描述】:
我正在通过 Jenkins 管道在 CentOS 7 机器上运行 Selenium 测试,因此使用 Xvfb。当使用 screen 参数和任何有效值时,如下 -
wrap([$class: 'Xvfb', autoDisplayName: true, screen: '1440x800x8']) {
<code to run Selenium test here>
}
导致以下错误 -
[testng] org.openqa.selenium.WebDriverException: chrome not reachable
[testng] (Session info: chrome=80.0.3987.132)
[testng] (Driver info: chromedriver=80.0.3987.16 (320f6526c1632ad4f205ebce69b99a062ed78647-refs/branch-heads/3987@{#185}),platform=Linux 3.10.0-862.el7.x86_64 x86_64) (WARNING: The server did not provide any stacktrace information)
[testng] Command duration or timeout: 0 milliseconds
[testng] Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:13:22.693Z'
如果我们在没有screen 参数的情况下运行它,它会成功运行。
另外一个观察 - 使用 screen 参数,它完全适用于 Ubuntu 18
请帮助我如何在 CentOS 7 上使用 screen 参数运行 Selenium 测试。
【问题讨论】:
标签: selenium jenkins selenium-webdriver jenkins-pipeline xvfb