openweb.py 270 Bytes Edit Raw Blame History 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 from selenium import webdriver from time import sleep #加载浏览器驱动 driver = webdriver.Firefox() driver.get("http://www.51zxw.net") print(driver.title) sleep(3) driver.get("http://www.baidu.com") print(driver.title) sleep(2) # 退出浏览器 driver.quit()