Chrome Flags Reference

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

--hide-scrollbars

What does --hide-scrollbars do?

Prevents creating scrollbars for web content. Useful for taking consistent screenshots.

Usage

CLILaunch Chrome with --hide-scrollbars using CLI

chrome --hide-scrollbars

PuppeteerLaunch Chrome with --hide-scrollbars using Puppeteer

const browser = await puppeteer.launch({
  args: ['--hide-scrollbars']
});

PlaywrightLaunch Chrome with --hide-scrollbars using Playwright

const browser = await chromium.launch({
  args: ['--hide-scrollbars']
});

SeleniumLaunch Chrome with --hide-scrollbars using Selenium

from selenium import webdriver

options = webdriver.ChromeOptions()
options.add_argument('--hide-scrollbars')

driver = webdriver.Chrome(options=options)