How to set browser’s width and height in Selenium WebDriver? Posted on 2024-03-252024-03-25 實際測試, 使用 argument 已失效 from selenium.webdriver import Chrome, ChromeOptions opts = ChromeOptions() opts.add_argument("--window-size=2560,1440") driver = Chrome(options=opts) 請改用: driver.set_window_size(width,height)