Navigating through the browser history in a cucumber feature using selenium

Updated . Posted . 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 .

Last edit
License
Source code in this card is licensed under the MIT License.
Posted to makandra dev (2012-05-08 12:58)