Navigating through the browser history in a cucumber feature using selenium

Posted About 12 years ago. Visible to the public.

In order to navigate through the browser history. you can manipulate the window.history object via javascript like follows:

When /^I go back in the browser history$/ do
  page.evaluate_script('window.history.back()')
end 

For further functions of the window and history objects check out this link Show archive.org snapshot .


An improved version of this step is now part of our gem spreewald on Github Show archive.org snapshot .

Andreas Robecke
Last edit
About 10 years ago
License
Source code in this card is licensed under the MIT License.
Posted by Andreas Robecke to makandra dev (2012-05-08 12:58)