I am doing automated testing using Selenium WebDriver with Ruby. I need to press a button. I cannot get a button element by id or css or xpath, because the button is transparent. I would like to use the Tab and Enter key to press the button.
I can use the Tab key to get the button as shown below:
@ element.send_keys: @element tab -> any javascript element visible in the browser
But how can I use the Enter key on a button?
Basically I need to press the Tab key and then press the Enter key to press the button.
I am using Selenium WebDriver @driver = Selenium :: WebDriver.for: firefox
Please help me. Thanks in advance.
source share