Google account login

If you want to test real world scenarios, you can also login to a Google account on BrowserStack devices. This can be useful to :

  1. Test Google in-app purchase flows
  2. Test accepting payments using Google Pay
  3. Test your app’s integration with other Google apps (e.g. Google Calendar)
  4. Test production version of your apps by downloading it from Google Play Store.

In order to do so, use the browserstack.appStoreConfiguration capability to pass your own credentials for Google Play Store login :

Capability Description Values
browserstack.appStoreConfiguration Set credentials for Google account login {"username" : "play-store-email", "password" : "play-store-password"}

Example:

DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
desiredCapabilities.setCapability("browserstack.appStoreConfiguration", new HashMap{String, String}(){ put("username", "your_email"); put("password", "your_password");});
var capabilities = {
	'browserstack.appStoreConfiguration': '{"username":"your_email", "password":"your_password"}'
}
DesiredCapabilities capability = new DesiredCapabilities();
capability.SetCapability("browserstack.appStoreConfiguration", "{"username":"your_email", "password":"your_password"}");
$capabilities = new DesiredCapabilities();
$capabilities->setCapability("browserstack.appStoreConfiguration", array("username" => "your_email", "password" => "your_password"));
desired_caps = {
    'browserstack.appStoreConfiguration': '{"username":"your_email", "password":"your_password"}'
}

Troubleshooting Google login issues

During test initialization, BrowserStack will attempt to log in on the tested device using specified Google account credentials. In certain cases, Google may pose a 2FA (Two-factor authentication) challenge, which requires you to approve login using a trusted device or an OTP (one-time password) or some other means. This will cause your test build to fail. To fix this, we recommend you to try the following :

  • Use a newly created Google account to sign in. Ensure that this account was never previously used to login on any other device or browser.
  • Turn off the account’s security settings - 2 Step verification and Use your phone to sign in

If you are still facing issues with Google account login, please reach out to BrowserStack support.

Note: Your Google account credentials are secure as we wipe the devices clean at the end of your test session

We're sorry to hear that. Please share your feedback so we can do better






Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better






Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback!

Talk to automation expert