水豚设置字段会导致'Attempt to set readonly element with value'



使用Firefox 47.0,我切换到木偶驱动程序。使用Capybara,当我尝试填写字段时,Capybara会响应"尝试设置具有值的可读元素",而不会设置字段值。查询可读的标志给出一个" false",那怎么了?

find_by_id('account_username').set(@username)
Attempt to set readonly element with value: test-1466414209-898496
*This will raise an exception in a future version of Capybara
find_by_id('account_username')['readonly']
=> "false"

使用Capybara 2.7.1和geckodriver 0.8.0在OSX上。

希望这是正确询问的地方。预先感谢!

如本期所述,您需要使用Capybara的Marionette分支才能工作。Geckodriver和Selenium之间的木偶支撑尚未完全工作,也不是Firefoxdriver的功能完全替代。目前,您最好恢复Firefox 46或等待Firefox 47.0.1发布本期github.com/jnicklas/capybara/issues/1709

相关内容

最新更新