Get your setup working faster. Join our Discord for optimisation tips from elite testers.Join our Discord
Test certificate based authentication
Test authentication using BrowserStack App Automate.
Test certificate-based authentication using multiple certificate formats (.pfx, .cer, .mobileconfig) on BrowserStack devices. You can automate certificate installation and sign in to dependent apps without manually entering passwords, streamlining your authentication testing workflow.
The certificate upload feature (supports .pfx, .cer, .mobileconfig) is currently in beta. To enable this feature for your account, contact BrowserStack support.
BrowserStack creates a Custom_Files folder in Files app → On My iPhone → Your app's directory. You can find the file under the App directory on your device.
Set the capability in test script
The password parameter is mandatory for PFX certificates. If you do not set a password, you must still pass an empty string (“”). For other certificate types (.cer, .mobileconfig), the password field is optional.
To use certificate based authentication, set the customCertificates capability with the certificateId as the value of the media_url parameter returned in the API response. Use the customCertificates capability for W3C protocol and browserstack.customCertificates capability for JSON Wire protocol in your test scripts:
You can upload and use up to 15 certificates in a session for authentication using the browserstack.customCertificates capability.
The password field is only required for .pfx files. .cer and .mobileconfig files do not require a password.
Each additional certificate installation will increase the session start time.
You can view the list of recently uploaded certificates. For more details, refer to the List uploaded media files section in the API reference documentation.
Did this page help you?
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