Getting the above, account is set to allow less secure app access
Try the following:
You need to log into any other website that uses the “Log in with Google” feature.
Open a different website you are familiar with that allows logging into it or signing up with Google, such as:
And sign up or login with the Gmail account you’d like to access.
And then you will be able to return to and login to your Gmail account.
All that should be in the test itself, afterwards once you continue in the test, you should be logged in to Gmail.