navigate back to previous page in selenium code example
Example 1: python selenium go back to previous page
driver.execute_script("window.history.go(-1)")
Example 2: can we navigate back and forth in selenium
We use navigate method
(navigate is an abstract method of Webdriver interface)
to navigate back and forth in a browser.
It has methods to move back, forward as
well as to refresh a page.
forward, to.. are abstract method
of Navigate interface