import time
from selenium import webdriverbrowser = webdriver.Chrome()
browser.get("https://www.baidu.com/")
browser.get("https://www.taobao.com/")
browser.get("https://www.sina.com/")# 后退
browser.back()time.sleep(5)# 前进
browser.forward()time.sleep(3)
browser.close()