Chrome's --headless deprecated since 129? --headless=new a new standard?

So I’ve started getting a frustrating… bug? whenever starting ChromeDriver with --headless (and the exact moment when I was to use it in the FCTA course…) in Windows 11 a blank window appears that can’t be interacted with, that’s not really linked to any Windows running “app” and therefore has no representation on the taskbar. It doesn’t disappear after the test is done and I could only get rid of it by blindly killing all of the 40 chrome processes in the task manager.

Long story short, there seems to be a new way of running headless chrome? I’ve found this stackoverflow on the topic: selenium webdriver - Chrome 129 Headless shows blank window - Stack Overflow

The solution it proposes, to use --headless=new worked for me – the window disappears once the test is complete.

@mwinteringham I think it would be good to reflect that in FCTA (CS?) 2.4.2 – it gave me quite a headache

3 Likes

Although some comments indicate that the issue might be gone with the next chrome version, 130…

https://issues.chromium.org/issues/367755364#comment5

2 Likes

Headache continues… Something is still definitely wrong. After a minor Chrome update headless=new started causing the problem instead of fixing it. Worst thing is locally I get different results than in my GitHub workflow that I’ve set up for my FCTA course…

1 Like

Sorry to hear you’re still having issues, @literallyme.

@mwinteringham, is this something you might be able to help Marek with?

Hi @literallyme

I’ve taken a look at this and unfortunately because I am on Mac I am unable to reproduce this issue. However, reviewing the SO page you sent I can see there is a suggestion of adding the following:

options.AddArguments("--headless=old")

As opposed to:

options.AddArguments("--headless=new")

Have you tried it with it set to old? I’m afraid if this is a bug in Chromium I don’t know what to suggest that hasn’t already been suggested in the SO article.

I found this, but it feels like it’s the same as what is shared on SO:

2 Likes

Hi @literallyme ,

Following up on Mark’s previous post, is there anything else you could share here to help others who might also be facing a similar problem?