【问题标题】:Cucumbers with Jenkins and vncserver throws random Timeout execution expired errorsCucumbers with Jenkins 和 vncserver 抛出随机 Timeout execution expired 错误
【发布时间】:2019-01-27 14:13:53
【问题描述】:

我是 Jenkins 的新手,并且已经设置了 4 个从站,并尝试在 vncserver(也尝试过 xvfb)模式下运行 Cucumbers(Capybara+Selenium+Firefox)。但是有的从节点超时了,下面一行随机抛出“execution expired (Timeout::Error)”

Capybara.current_session.driver.browser.manage.window.resize_to(1600, 900)

page.driver.browser.save_screenshot(screenshot_path)

从这里开始,所有剩余的测试都失败了。也曾尝试在 Jenkins 中使用 Xvnc 插件,但仍然失败。我该如何解决?我应该使用窗口管理器吗? tightvnc 会使用任何默认的窗口管理器吗?有关系吗?

我的~/.vnc/xstartup

#!/bin/sh

xrdb $HOME/.Xresources

xsetroot -纯灰色

#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &

#x-window-manager &

# 修复以使 GNOME 工作

导出 XKL_XMODMAP_DISABLE=1

/etc/X11/Xsession

有人知道导致超时错误的原因吗?

【问题讨论】:

标签: jenkins cucumber vnc-server


【解决方案1】:

看起来发生这种情况是因为浏览器有时打开需要时间,所以我们必须等待或断言直到浏览器加载。链接在这里:https://sqa.stackexchange.com/questions/15345/selenium-webdriver-sometimes-fails-to-connect-to-the-browser-when-running-tests

【讨论】:

    猜你喜欢
    • 2011-02-15
    • 1970-01-01
    • 2017-12-01
    • 1970-01-01
    • 2011-01-16
    • 1970-01-01
    • 2018-02-23
    • 1970-01-01
    • 2013-05-30
    相关资源
    最近更新 更多