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

前端 未结 6 1317
我在风中等你
我在风中等你 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:25

    @Page.selector.send_keys :return

    This works for me, where selector is the element in your page object element :selector, ''

提交回复
热议问题