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?