Couldn t sign to Chrome with selenium

0 votes

i tried to write script to download mail from gmail using selenium with python,

but when sign in into google via webdriver, all the time chorme is mention "This browser or app may not be secure."

i tried with adding following arguments as well  but it's not fixed yet.

options = webdriver.ChromeOptions()
options.add_argument("--incognito")
options.add_argument("--lang=en-us")
options.add_argument("--disable-web-security")
options.add_argument("--allow-running-insecure-content")
**can some one help me to get this solve....
Apr 20, 2020 in Selenium by anonymous
• 250 points
4,099 views

2 answers to this question.

+1 vote

The error message you are getting implies that the WebDriver was unable to authenticate the Browsing Context i.e. Browser session.

In these cases, the respective solution would be to:

Hope this helps! 

answered Apr 20, 2020 by Sirajul
• 58,990 points
Thanks for your reply.

but two factor authentication has been disabled already for this account.

is there any another ways that i can used to fix this?
Have you allowed the less secure apps for your account?
Yes, i tried with that way as well, but same error is happening again.

 This issue probably may be when multiple gmail accounts have already been created from the same App/IP/Device. Google somehow is marking those accounts and blocks them if they are launched by automation frameworks/extensions.

Here's what you could try

  • Create a fresh GMail account using a different mobile number from another device and try the same.
+1 vote
Yes. I have spent my whole day and finally got a solution. You have to create h new dummy account for test automation because google has implemented some automation checks. So please try with New Dummy Account. Hope It's works
answered Aug 25, 2020 by anonymous

Related Questions In Selenium

+1 vote
1 answer

How to handle notifications in Python with Selenium (Chrome WebDriver)

Below will help you: You can disable the ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,890 points
8,098 views
0 votes
4 answers

How to setup Chrome driver with Selenium on MacOS?

Hi Nushrat, In MacOs follow the steps and ...READ MORE

answered Aug 9, 2020 in Selenium by Shipra
18,854 views
0 votes
2 answers

How to avoid the pop-up window in chrome browser with Selenium?

Alert alertCancel = driver.switchTo().alert(); READ MORE

answered Sep 5, 2020 in Selenium by Sri
• 3,010 points
9,343 views
0 votes
2 answers

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,520 points
4,630 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,010 points
5,474 views
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,890 points
3,303 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 2, 2020 in Selenium by Sri
• 3,010 points
3,904 views
0 votes
1 answer

How to open chrome default profile with selenium?

Try the following code. System.setProperty("webdriver.chrome.driver","C:\\chromedriver.exe"); ChromeOptions options = new ...READ MORE

answered Aug 11, 2020 in Selenium by Sirajul
• 58,990 points
2,973 views
+2 votes
1 answer

Selenium with C Sharp -- How to perform Explicit Wait method

The explicit wait is used to tell ...READ MORE

answered Dec 23, 2019 in Selenium by Sirajul
• 58,990 points
296 views