Chrome Flags Reference

Chrome command line switches and startup flags for automation, headless mode, and debugging.

--force-device-scale-factor

What does --force-device-scale-factor do?

Overrides the device scale factor for the browser UI and the contents.

Usage

CLILaunch Chrome with --force-device-scale-factor using CLI

chrome --force-device-scale-factor

PuppeteerLaunch Chrome with --force-device-scale-factor using Puppeteer

const browser = await puppeteer.launch({
  args: ['--force-device-scale-factor']
});

PlaywrightLaunch Chrome with --force-device-scale-factor using Playwright

const browser = await chromium.launch({
  args: ['--force-device-scale-factor']
});

SeleniumLaunch Chrome with --force-device-scale-factor using Selenium

from selenium import webdriver

options = webdriver.ChromeOptions()
options.add_argument('--force-device-scale-factor')

driver = webdriver.Chrome(options=options)