selenium3基于python语言基础操作之浏览器窗口大小设置
作者:互联网
from selenium import webdriver
import time
driver = webdriver.Chrome()
# 窗口最大化
driver.maximize_window()
# 访问百度浏览器
driver.get("http://www.baidu.com")
time.sleep(3)
# 窗口最小化
driver.minimize_window()
time.sleep(3)
# 窗口自定义
driver.set_window_size(width=960, height=600)
time.sleep(3)
driver.quit()
标签:浏览器,python,driver,window,sleep,selenium3,time,窗口 来源: https://www.cnblogs.com/peijiao/p/15824064.html