Ruby 如何使用带selenium web驱动程序的Capybara发送密钥
我知道水豚使用本机,我需要为此安装gem吗Ruby 如何使用带selenium web驱动程序的Capybara发送密钥,ruby,selenium,automation,capybara,Ruby,Selenium,Automation,Capybara,我知道水豚使用本机,我需要为此安装gem吗 如果使用capybara 2.5,在搜索框中键入后,我尝试按enter键 input = find_field 'id, name, label of search box' input.send_keys 'text to send', :enter 如果使用含硒小于2.5的水豚,则 input.native.send_keys 'text to send', :enter def searchkeys searchbox=find:css,q
如果使用capybara 2.5,在搜索框中键入后,我尝试按enter键
input = find_field 'id, name, label of search box'
input.send_keys 'text to send', :enter
如果使用含硒小于2.5的水豚,则
input.native.send_keys 'text to send', :enter
def searchkeys searchbox=find:css,q searchbox.send_keys关键字,:输入end require“rails\u ui\u helper”描述“Search”do it“should serarch for article”do@home\u page.home@home\u page.searcharticle name end end1 Search for article Failure/Error:@home\u page.searcharticle name NotImplementedError:NotImplementedError/Users/techops/.rvm/gems/ruby-2.2.3/gems/capybara-2.5.0/lib/capybara/driver/node.rb:54:in send\u keys'/Users/techops/.rvm/gems/ruby-2.2.3/gems/capybara-2.5.0/lib/capybara/node/element.rb:224:in send\u key's中的块中/Users/techops/.rvm/gems/ruby-2.2.3/gems/capybara-2.5.0/lib/capybara/node/base.rb:84:in`synchronize'/Users/techops/.rvm/gems/ruby-2.2.3/gems/capybara-I仍然得到未实现的错误。您确定您实际使用的是selenium驱动程序,并且没有使用不支持JS的机架测试,因此也不支持JS键吗事件???如果您实际使用的是selenium,则stacktraceI use selenium中的某个地方会有/lib/capybara/selenium/node.rb,并且在尝试向输入字段发送键时仍然会出现NotImplemented错误