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

Capybara setting a field results in 'Attempt to set readonly element with value'

对于 Firefox 47.0,我切换到了 Marionette 驱动程序。 使用 Capybara,当我尝试填写字段时,Capybara 以 'Attempt to set readonly element with value' 响应并且不设置字段值。查询只读标志给出了'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"

在 OSX 上使用 Capybara 2.7.1 和 geckodriver 0.8.0。

希望这是正确的提问地点。 提前致谢!

this issue, you need to be using the marionette branch of Capybara for that to work. Marionette support between geckodriver and selenium is not yet fully working, and not a fully functional replacement for firefoxdriver. For now, you're better off reverting to Firefox 46 or waiting for the Firefox 47.0.1 release as mentioned in this issue github 中所述。com/jnicklas/capybara/issues/1709