Watir - 悬停方法不适用于aws windows box firefox

时间:2014-12-13 18:08:32

标签: amazon-web-services automation cucumber watir

在Mac OS上运行完美,但是当我在AWS Windows上运行时(不是无头)悬停不起作用。

我将鼠标悬停在css

元素的“#attr1”上
#features/step_definitions/home_page.rb:49
  Net::ReadTimeout (Net::ReadTimeout)
  ./features/step_definitions/home_page.rb:50:in `/^I hover over "([^"]*)" of an element with css$/'
  features\CampaignTest.feature:95:in `And I hover over "#attr1" of an element with css'
And I hover over "#attr2" of an element with css                               

当我在chrome上运行相同的测试时我遇到了同样的问题,但我通过最大化窗口来修复它。

$browser.window.resize_to(1450, 1200)
$browser.driver.manage.window.maximize

(这并没有完全最大化铬,所以我只是在上面添加了链接。)

1 个答案:

答案 0 :(得分:1)

如果您收到Net :: ReadTimeout异常,则表示它可能是浏览器驱动程序错误。这假设您没有在chrome中获得相同的错误。

您的确切代码和完整堆栈跟踪(使用--backtrace运行您的cuke)将有助于追踪根本原因。如果我们可以重现它,我可以帮助提交错误报告。