Chrome 111 - Headless Window Size

319 views
Skip to first unread message

Paul McGrellis

unread,
Mar 14, 2023, 6:21:50 AM3/14/23
to ChromeDriver Users
Hi,

I know this was an issue in 110 but has anyone found a solution yet?

options.AddArguments(
                "--headless=new",
                "--disable-gpu",
                "--disable-extensions",
                "--allow-running-insecure-content",
                "--ignore-certificate-errors",
                "--disable-dev-shm-usage",
                "--window-size=1920,1080",
                "--start-maximized",
                "--no-sandbox",
                "--force-device-scale-factor=0.75"
            );

Dinesh Babbar

unread,
Mar 15, 2023, 4:09:02 AM3/15/23
to ChromeDriver Users
Still struggling with the same.

Rafael Ortega

unread,
Mar 15, 2023, 2:12:36 PM3/15/23
to ChromeDriver Users
We are facing the same issue using selenium C# and Windows Agents on our CI.
`
chromeOptions.AddArguments("--headless", "--ignore-certificate-errors", "--disable-gpu", "--window-size=1920,1080", "--start-maximized", "--no-sandbox", "--proxy-server='direct://'", "--proxy-bypass-list=*");
`


Baker Sensing

unread,
Mar 15, 2023, 3:22:20 PM3/15/23
to ChromeDriver Users
options.add_argument("disable-infobars")
  options.add_argument("start-maximized")
  options.add_argument("disable-dev-shm-usage")
  options.add_argument("no-sandbox")
  options.add_experimental_option("excludeSwitches", ["enable-automation"])
  options.add_experimental_option("prefs", {
  "download.default_directory": r"insert\desired\download\path",
  "download.prompt_for_download": False,
  "download.directory_upgrade": True,
  "safebrowsing.enabled": True
  })
  options.add_argument("disable-blink-features=AutomationControlled")
  options.add_argument("--window-size=1920x1080")
  options.add_argument("--headless=new")
 
This is working for me! Just make sure you have done the following:
1. newest version of chromedriver 111  downloaded 
2. updated the path in your environment variables and in service to match the path of the new chromedriver.exe

Baker Sensing

unread,
Mar 15, 2023, 3:24:02 PM3/15/23
to ChromeDriver Users
This is using python!!
Reply all
Reply to author
Forward
0 new messages