watir-webdriver无法在无头firefox中找到复选框

时间:2015-12-22 23:18:25

标签: ruby automated-tests watir watir-webdriver

我正在尝试使用watir-webdriver

驱动的页面上有此复选框
corsheaders

我已使用ID <input type="checkbox" name="company[active]" id="archived">

识别出来

并尝试使用代码

进行设置
status_id: "archived"

我收到错误

    @b.checkbox(:id => @@locator[:status_id]).wait_until_present
    @b.checkbox(:id => @@locator[:status_id]).set

还尝试使用具有相同结果的name属性

它在firefox和phantomjs中运行良好。这只在firefox的无头版本中失败

无头火狐设置

timed out after 30 seconds, waiting for {:id=>"archived", :tag_name=>"input", :type=>"checkbox"} to become present (Watir::Wait::TimeoutError)

是否有任何面孔相同并且能够解决它?

0 个答案:

没有答案