I am trying to create a vba code using selenium to login an Gmail account, but after inputting the email and click on Next button, I got a message
Couldn’t sign you in
This browser or app may not be secure.
This is my code till now (but I am stuck as a result of that message)
Private bot As Object
Sub Test()
Const sURL As String = "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"
Const sAccount As String = "gmailaccount@gmail.com"
Const sPassword As String = "mypassword"
Set bot = CreateObject("Selenium.ChromeDriver")
With bot
.Start "Chrome", sURL
.Window.Maximize
.Get sURL
With .FindElementByXPath("//*[@id='identifierId']")
.Clear: .SendKeys sAccount
End With
.FindElementByXPath("//*[@id='identifierNext']/div/button/span").Click
Stop
End Sub
Is there any workaround to solve such a problem?
I could find how to solve it in python through installing undetected-chromedriver but what about VBA?