Search code examples
rubywatirfirewatirbrowser-automation

How do I send keyboard commands like (Control) + (1) to the browser using Ruby and FireWatir?


I am using FireWatir to test a web app and I need to send CTRL + 1 to open up a connection to plugin text "LTN 123456" and send CTRL +2 to close the connection.


Solution

  • I would suggest that you forget firewatir gem and use watir-webdriver gem (it drives Firefox, Chrome and Internet Explorer). The API is probably 99% the same. It also has good send_keys implementation.