Set Play Store credentials in Appium tests
You can log in to a Google account on a BrowserStack device to test:
Use the app store configuration capability to pass your credentials to login Google Play Store:
If you are using BrowserStack SDK, you can set the following capability within the browserstack.yml
file:
Capability | Description | Values |
---|---|---|
appStoreConfiguration | Set credentials for Google account login | "username" : "play-store-email" "password" : "play-store-password" |
BrowserStack SDK is a plug-n-play solution that takes care of all the integration steps for you. Using the BrowserStack SDK is the recommended integration method for your project. To know more, visit the SDK core concepts page.
Use the following code snippet to pass your credentials to login Google Play Store:
Capability | Description | Values |
---|---|---|
appStoreConfiguration | Set credentials for Google account login | "username" : "play-store-email" "password" : "play-store-password" |
Example:
DesiredCapabilities capabilities = new DesiredCapabilities(); HashMap<String, Object> browserstackOptions = new HashMap<String, Object>(); browserstackOptions.put("appStoreConfiguration", new HashMap<String, String>() );
var capabilities = { 'bstack:options' : { "appStoreConfiguration" : {"username" : "your_email", "password" : "your_password" }, } }
AppiumOptions capabilities = new AppiumOptions(); Dictionary<string, string> appStoreConfiguration = new Dictionary<string, string> { { "username", "your_email" }, { "password", "your_password" } }; browserstackOptions.Add("appStoreConfiguration", appStoreConfiguration);
$caps = array( 'bstack:options' => array( "appStoreConfiguration" => array("username" => "your_email", "password" => "your_password" ), ), )
capabilities = { 'bstack:options' => { "appStoreConfiguration" => {"username" => "your_email", "password" => "your_password" }, }, }
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 some cases, Google may pose a Two-Factor Authentication (2FA) that requires you to approve login using a trusted device or an One-Time Password (OTP) or by some other means. This will fail your test build. To fix this:
If you are still facing issues with Google account login, please reach out to BrowserStack support.
Your Google account credentials are secure as we wipe the devices clean at the end of your test session
Did this page help you?Yes No
We're sorry to hear that. Please share your feedback so we can do better
Submit
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
Any additional feedback?
Submit
Is this page helping you?
Yes NoWe're sorry to hear that. Please share your feedback so we can do better
Submit Skip
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
Any additional feedback?
Submit Skip
Thank you for your valuable feedback!
ncG1vNJzZmivp6x7o77OsKqeqqOprqS3jZympmeUpLC0e8Cpp2aZpam8rq3TnmaaqKCewq57wJ2tmqaTmrFussSaq66qlah8tLHTrqdmn5%2BktK2xjJqanKelo8E%3D