Rayrun
← Back to Discord Forum

Gmail signin issue with headless mode

Ashish Vishnoiposted in #help-playwright
Open in Discord
Ashish Vishnoi
Ashish Vishnoi

How come the Gmail signin works fine within the test method, but doesn't work from globalSetup.ts file? If running with chrome in headless mode. Any idea how to fix it? <#1054804523652231198>

20231003_103123.jpg

This thread is trying to answer question "Why doesn't Gmail sign-in work from the globalSetup.ts file when running with Chrome in headless mode and how to fix it?"

10 replies

Try with Firefox, if it doesn't have to be Chrome.

Add argument --enable-javascript

Ashish Vishnoi
Ashish Vishnoi
20231004_144107.jpg
Ashish Vishnoi
Ashish Vishnoi

It didn't work

Ashish Vishnoi
Ashish Vishnoi

Running in Firefox worked, but is there a way to make it work with chromium as well?

it's tricky. I take it you're not testing the google login? so perhaps you can consider storing the session with firefox and then run on chrome with the same stored session, that would work.

bhushan.trivedi

i think google login not allow bot or automation kind of testing

@bhushan.trivedi: But why did it work on Firefox?

But why did it work on Firefox?

probably easier for google to detect automation when it's chromium/chrome when compared to firefox 🤷

@mookiept: If you are interested in figuring out another case with similar behaviour, I've created a new post on my experience here https://discord.com/channels/807756831384403968/1162276444634873947

If you are interested in figuring out another case with similar behaviour, I've created a new post on my experience here https://discord.com/channels/807756831384403968/1162276444634873947

Related Discord Threads

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email luc@ray.run.