-1

It seemed I couldn't automate gmail login. my code was right but once selenium typing the username and clicking next, it wouldn't let me type in the password.

Below was what showed in the password page: Couldn’t sign you in This browser or app may not be secure. Learn more Try using a different browser. If you’re already using a supported browser, you can refresh your screen and try again to sign in.

Is there a way to solve this?

driver.get("https://accounts.google.com/signin/v2/identifier?continue=https%3A%2F%2Fmail.google.com%2Fmail%2F&service=mail&sacu=1&rip=1&flowName=GlifWebSignIn&flowEntry=ServiceLogin")

#driver.maximize_window()

#driver.find_element_by_class_name("whsOnd").send_keys("email address")
#driver.find_element_by_class_name("VfPpkd-RLmnJb").click()

Adrian W
  • 4,563
  • 11
  • 38
  • 52
Qing Bai
  • 11
  • 1
  • 5
  • 2
    possible duplicate of https://stackoverflow.com/questions/59514049/unable-to-sign-into-google-with-selenium-automation-because-of-this-browser-or – cruisepandey May 25 '21 at 03:56
  • 1
    Does this answer your question? [Unable to sign into google with selenium automation because of "This browser or app may not be secure."](https://stackoverflow.com/questions/59514049/unable-to-sign-into-google-with-selenium-automation-because-of-this-browser-or) – Prophet May 25 '21 at 09:11
  • Does this answer your question? [“This browser or app may not be secure” error while attempting to login in to Gmail account using GeckoDriver Firefox through Selenium and Python](https://stackoverflow.com/questions/59515561/this-browser-or-app-may-not-be-secure-error-while-attempting-to-login-in-to-gm) – questioning Nov 29 '21 at 10:37

1 Answers1

0

You can use https://pypi.org/project/undetected-chromedriver/ which is an undetected driver. This should work.