--ash-host-window-bounds
What does --ash-host-window-bounds do?
Sets a window size, optional position, optional scale factor and optional panel radii. "1024x768" creates a window of size 1024x768. "100+200-1024x768" positions the window at 100,200. "1024x768*2" sets the scale factor to 2 for a high DPI display. "1024x768~15|15|12|12" sets the radii of the panel corners as (upper_left=15px,upper_right=15px, lower_right=12px, upper_left=12px) "800,0+800-800x800" for two displays at 800x800 resolution. "800,0+800-800x800,0+1600-800x800" for three displays at 800x800 resolution.
Usage
CLILaunch Chrome with --ash-host-window-bounds using CLI
chrome --ash-host-window-boundsPuppeteerLaunch Chrome with --ash-host-window-bounds using Puppeteer
const browser = await puppeteer.launch({
args: ['--ash-host-window-bounds']
});PlaywrightLaunch Chrome with --ash-host-window-bounds using Playwright
const browser = await chromium.launch({
args: ['--ash-host-window-bounds']
});SeleniumLaunch Chrome with --ash-host-window-bounds using Selenium
from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_argument('--ash-host-window-bounds')
driver = webdriver.Chrome(options=options)