seleniumbase / SeleniumBase

📊 Blazing fast Python framework for web crawling, scraping, testing, and reporting. Supports pytest. Stealth abilities: UC Mode and CDP Mode.
https://seleniumbase.io
MIT License
5.44k stars 983 forks source link

There's a blank window bug on Windows with headless Chromium 129 #3156

Closed mdmintz closed 2 months ago

mdmintz commented 2 months ago

There's a blank window bug on Windows with headless Chromium 129

There's already a ticket here: https://issues.chromium.org/issues/367755364. (It doesn't sound like they're going to fix it, so I will.)

The simple fix is to move the window off-screen when using headless Chromium on Windows:

--window-position=-2400,-2400

chrome_options.add_argument("--window-position=-2400,-2400")

That's what I've been telling people to do on Stack Overflow: Stack Overflow: Chrome 129 Headless shows blank window Stack Overflow: Selenium headless broke after Chrome update

I'll apply my fix directly into SeleniumBase so that it's automatic when using headless Chromium on Windows.

CatalinaCharlotte commented 2 months ago

I have a question: If I am using 'Driver()', how should I add 'option'?

mdmintz commented 2 months ago

This was resolved in 4.31.0 - https://github.com/seleniumbase/SeleniumBase/releases/tag/v4.31.0