Selenium Login Blocked by Google

142 views
Skip to first unread message

Gabor Juhasz

unread,
Aug 13, 2022, 2:44:38 AM8/13/22
to Selenium Users
Hi,

Does anybody have some solution/workaround/hack for this problem :

I have tried some but they do not work for me.

Gabor

ebubekir bastama

unread,
Aug 13, 2022, 4:12:57 AM8/13/22
to seleniu...@googlegroups.com
  Hello
You can do
1-) You will change user-agent to mobile
3-)  ChromeOptions  AddArgument add

Example Code
   ChromeOptions op = new ChromeOptions();
            op.AddArgument("disable-blink-features=AutomationControlled");
            op.AddArgument("Mozilla/5.0 (Linux; Android 9; LM-X220) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Mobile Safari/537.36");
            ChromeDriver drv = new ChromeDriver(op);

            drv.Navigate().GoToUrl("https://accounts.google.com/signin/v2/identifier?service=mail&passive=1209600&osid=1&continue=https%3A%2F%2Fmail.google.com%2Fmail%2Fu%2F0%2F&followup=https%3A%2F%2Fmail.google.com%2Fmail%2Fu%2F0%2F&emr=1&flowName=GlifWebSignIn&flowEntry=ServiceLogin");


other Ready-made methods on this page


Other features of Selenium 4
I explained in this training set
But Turkish :(





Gabor Juhasz <gabor.s...@gmail.com>, 13 Ağu 2022 Cmt, 09:44 tarihinde şunu yazdı:
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/7168f959-ed50-466b-a562-cee1bce2479bn%40googlegroups.com.

ebubekir bastama

unread,
Aug 13, 2022, 4:36:50 AM8/13/22
to seleniu...@googlegroups.com
Edit Code argument useragent
 op.AddArgument("--user-agent=Mozilla/5.0 (Linux; Android 9; LM-X220) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Mobile Safari/537.36");

ebubekir bastama <ebubeki...@gmail.com>, 13 Ağu 2022 Cmt, 11:11 tarihinde şunu yazdı:

Gabor Juhasz

unread,
Aug 26, 2022, 4:08:05 PM8/26/22
to Selenium Users
Hi Ebubekir,

Sorry for late reply I have been busy recently.

Thanks for your answer I am trying it soon.

Kind regards,
Gabor
Reply all
Reply to author
Forward
0 new messages