Looking for other options? Check out the Local Quickstart for local devices, Cloud Mobile Quickstart for Minitap cloud devices, or Physical iOS Setup for USB-connected devices.
What is BrowserStack?
BrowserStack App Automate provides access to real physical iOS devices in the cloud. Key benefits:Real Physical Devices
Test on actual iPhones and iPads, not simulators
No Local Hardware
No need to own or maintain iOS devices
CI/CD Ready
Perfect for automated testing pipelines
Cross-Device Testing
Access multiple device models and iOS versions
Prerequisites
1
BrowserStack Account
Sign up at BrowserStack and get access to App Automate.
2
Get Credentials
From your BrowserStack dashboard, get your:
- Username: Your BrowserStack username
- Access Key: Your BrowserStack access key
3
Upload Your App
Upload your iOS app (.ipa) to BrowserStack and get the Response:
app_url:4
Install SDK
Creating Your First BrowserStack Automation
Basic Example
browserstack_demo.py
Run the Script
Configuration Options
BrowserStackClientConfig
Available Devices
BrowserStack supports a wide range of iOS devices. Some popular options:Environment Variables
For security, store your credentials as environment variables:.env
Viewing Session Results
After running your automation, you can view detailed session information in the BrowserStack dashboard:- Navigate to BrowserStack App Automate Dashboard
- Find your session by build name or session name
- View:
- Video recording of the session
- Screenshots at each step
- Device logs
- Network logs
The session URL is also logged when the session starts:
Supported Operations
The BrowserStack client supports the following operations:Some operations like
app_current() and install() are not supported on BrowserStack. Apps must be pre-uploaded to BrowserStack.Complete Example with Structured Output
browserstack_structured.py
Troubleshooting
Session fails to start
Session fails to start
Possible causes:
- Invalid credentials
- Invalid app_url
- Device/OS combination not available
- Verify your username and access key
- Re-upload your app and get a fresh
app_url - Check BrowserStack device list for valid device/OS combinations
App not launching
App not launching
Possible causes:
- App not properly signed
- App incompatible with selected iOS version
- Ensure your .ipa is signed for distribution
- Try a different iOS version that matches your app’s minimum deployment target
Timeout errors
Timeout errors
Possible causes:
- Slow network connection
- BrowserStack queue delays
- Check your internet connection
- Try during off-peak hours
- Consider using BrowserStack’s priority queue (paid feature)
Element not found
Element not found
Possible causes:
- UI not fully loaded
- Different UI on physical device vs simulator
- Add appropriate waits in your automation
- Use
describe_all()to inspect the actual UI hierarchy - Check the session video in BrowserStack dashboard
Best Practices
Use Environment Variables
Never hardcode credentials - use environment variables or secrets management
Organize Sessions
Use
build_name and session_name to organize and find sessions easilyHandle Cleanup
Always use try/finally to ensure
agent.clean() is calledCheck Device Availability
Verify device/OS combinations before running tests
Next Steps
Local Quickstart
Set up local device automation
Cloud Mobiles
Use Minitap’s cloud devices
SDK Reference
Complete Agent API documentation
Examples
More automation examples

