--window-size
What does --window-size do?
Specify the initial window size: --window-size=w,h
Usage
CLILaunch Chrome with --window-size using CLI
chrome --window-sizePuppeteerLaunch Chrome with --window-size using Puppeteer
const browser = await puppeteer.launch({
args: ['--window-size']
});PlaywrightLaunch Chrome with --window-size using Playwright
const browser = await chromium.launch({
args: ['--window-size']
});SeleniumLaunch Chrome with --window-size using Selenium
from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_argument('--window-size')
driver = webdriver.Chrome(options=options)