python selenium click and get back to previous page code example Example: python selenium go back to previous page driver.execute_script("window.history.go(-1)")