浏览器的操作

浏览器窗口大小设置

driver.maximize_window

页面前进后退

driver.back

driver.forward

页面刷新

driver.refush

from selenium import webdriver
from time import sleep

driver=webdriver.Chrome()

driver.get("http://www.51zxw.com")
driver.maximize_window()
sleep(3)

driver.get("http://www.51job.com")
driver.set_window_size(400,800)
driver.refresh()
sleep(2)

driver.back()
sleep(2)

driver.forward()
sleep(2)

driver.quit()

 

posted @ 2017-10-27 18:01  小青~  阅读(146)  评论(0编辑  收藏  举报