Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 319 Bytes

navigate-back-in-the-browser-with-capybara.md

File metadata and controls

15 lines (11 loc) · 319 Bytes

Navigate Back In The Browser With Capybara

There are two ways to navigate back to a previous page. Capybara is driving the browser and it can be instructed to go back using its built-in command or by executing some JavaScript.

page.go_back

or

page.evaluate_script('window.history.back()')