How do I simulate hitting enter in an input field with Capybara and ChromeDriver?

前端 未结 6 1320
我在风中等你
我在风中等你 2020-12-24 11:42

I have the following helper method to input a string into an input field and press the enter key, but it seems the enter key is never pressed. I see the string entered into

6条回答
  •  孤独总比滥情好
    2020-12-24 12:07

    Capybara doesn't have native support for a send_keys type event. You might be able to go down to selenium to do it, or you can try this gem https://github.com/markgandolfo/send-keys

提交回复
热议问题