Search code examples
rubyseleniumselenium-webdrivercucumberwatir-webdriver

How to type special characters (@) using send_keys in watir-webdriver?


I'm trying to type an simple e-mail in a text field in a website using cucumber/ruby/water-webdriver. But the "@" symbol does not appear. For example, I write:

$browser.send_keys "testemail@gmail.com"

in the textfield, it appears: testemailgmail.com.

I tried using [:shift, "'"] and it also does not work.

Also tried:

$browser.text_field(:id => "search-global").set "testemail@gmail.com"

Appreciate any help!


Solution

  • It's working normally now. I read somewhere this was something to do with chromedriver. Updated and it's fine. Thanks for the help.