'Logging in to Google while running automated tests through AWS Device Farm

So I am currently starting a new automation project, Java, Selenium, TestNG. Tests would normally run through AWS Device Farm (web automation).

The application that needs to be tested requires logging in through Google. This does not create any issue while running the tests locally. But the moment I run the tests through AWS Device Farm (completely different region from where those Google accounts are usually logging in from) my tests always stop and fail because Google asks for the phone number.

Did anyone else face this issue? Is there any way to bypass this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source