I'm using Selenium WebDriver to visit a website that often times out a lot. For some reason, the only way to get the site loaded properly after a time out is to clear the history and reload the page. Is that possible with Selenium? To bring up the history in Firefox is CTRL + SHIFT + DEL; How can I enter these keystrokes and then reload the page? I've looked through the docs which lists a few methods for pressing keys, but so far I haven't gotten them to work. Any help would be so greatly appreciated.
begin driver = Selenium::WebDriver.for :firefox driver.navigate.to "http://example.com/" driver.find_element(:id, 'loginname').send_keys 'firstname.lastname@example.org' ... rescue Exception #Some sort of code to press CTRL + SHIFT + DELETE, ENTER #or clear the history in another way retry end