I need to click enter key of keyboard in cucumber test cases. I have used selenium web-driver. Please tell me how to do it?
You can use keys and ActionBuilder:
page.driver.browser.key_down(:enter).key_up(:enter).perform
or send_keys:
find(:id, 'my_id').native.send_keys(:enter)
Capybara doesn't currently contain its own API for pressing keys.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With