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()