microsoft / playwright

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
https://playwright.dev
Apache License 2.0
66.74k stars 3.66k forks source link

Chrome Browser being tagged as "insecure" by Google[Question] #19420

Closed edwin-tumbaga closed 1 year ago

edwin-tumbaga commented 1 year ago

Hi

I am trying to log in to my Google account using Python Playwright. I am able to enter my user name, but upon clicking "next", I get this message, "This browser or app may not be secure. Try using a different browser. If you’re already using a supported browser, you can try again to sign in."

Here is my very simple code snippet. I am using Python Playwright:

` from playwright.sync_api import sync_playwright def main(): with sync_playwright() as p: browser = p.chromium.launch(headless=False) page = browser.new_page() page.goto('https://accounts.google.com/') page.wait_for_timeout(1000)
page.click("#identifierId") page.fill("#identifierId", "test2@gmail.com") page.keyboard.press('Enter'); page.wait_for_timeout(50000) browser.close()

if name == 'main': main()`

I cannot seem to find a solution to this. Any help would be appreciated.

2022-12-13 14_37_05-Sign in - Google Accounts - Chromium

yury-s commented 1 year ago

Google has all kinds of antibot protection and since the browser is controlled by browser automation tool (playwright) it may well deny access based on that (e.g. if webdriver field is true etc). Stealth mode where the server cannot tell if it's a human user or an automation tool is not a goal for playwright as for QA web automation it's usually not an issue. You should be able to find a solution in scrapers forums.

postpace commented 7 months ago

I'm also facing this issue and my company needs daily test on production authentication process. is there a way to bypass this security issue?

teresaxfc commented 5 months ago

Try to sign up for a new Google account, it should work.

RuanAlesi commented 3 months ago

Google has all kinds of antibot protection and since the browser is controlled by browser automation tool (playwright) it may well deny access based on that (e.g. if webdriver field is true etc). Stealth mode where the server cannot tell if it's a human user or an automation tool is not a goal for playwright as for QA web automation it's usually not an issue. You should be able to find a solution in scrapers forums.

It was working using Firefox (Nightly v125) but no longer with v128. What happened?