Chrome Flags Reference

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

--target-device-scale-for-testing

What does --target-device-scale-for-testing do?

Allows web tests to specify the target device scale for the test cases.

Usage

CLILaunch Chrome with --target-device-scale-for-testing using CLI

chrome --target-device-scale-for-testing

PuppeteerLaunch Chrome with --target-device-scale-for-testing using Puppeteer

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

PlaywrightLaunch Chrome with --target-device-scale-for-testing using Playwright

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

SeleniumLaunch Chrome with --target-device-scale-for-testing using Selenium

from selenium import webdriver

options = webdriver.ChromeOptions()
options.add_argument('--target-device-scale-for-testing')

driver = webdriver.Chrome(options=options)

Build Conditions

LOAD_WEBUI_FROM_DISK