Chrome Flags Reference

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

--disable-screen-orientation-lock

What does --disable-screen-orientation-lock do?

Disable the locking feature of the screen orientation API.

Usage

CLILaunch Chrome with --disable-screen-orientation-lock using CLI

chrome --disable-screen-orientation-lock

PuppeteerLaunch Chrome with --disable-screen-orientation-lock using Puppeteer

const browser = await puppeteer.launch({
  args: ['--disable-screen-orientation-lock']
});

PlaywrightLaunch Chrome with --disable-screen-orientation-lock using Playwright

const browser = await chromium.launch({
  args: ['--disable-screen-orientation-lock']
});

SeleniumLaunch Chrome with --disable-screen-orientation-lock using Selenium

from selenium import webdriver

options = webdriver.ChromeOptions()
options.add_argument('--disable-screen-orientation-lock')

driver = webdriver.Chrome(options=options)

Build Conditions

LOAD_WEBUI_FROM_DISKANDROID