Scripts for testing the PauseAI website on real iOS Safari devices via AWS Device Farm.
Playwright's WebKit engine doesn't catch all iOS Safari-specific rendering issues. For example, margin: -20px causing document overflow was only visible on real iOS Safari, not Playwright WebKit (see issue #562).
-
AWS CLI with the
device-testingprofile configured:aws configure --profile device-testing # Region: us-west-2 (Device Farm only available there) -
Python packages:
pip install Appium-Python-Client
Test a URL on real iPhone Safari:
python3 scripts/device-farm/ios-safari-test.py https://pauseai.info # Test a Netlify preview: python3 scripts/device-farm/ios-safari-test.py https://deploy-preview-123--pauseai.netlify.app # Specify output directory for screenshots: python3 scripts/device-farm/ios-safari-test.py https://pauseai.info ./screenshotsThe script will:
- Create a Device Farm session on an iPhone 13 (iOS 16)
- Open Safari and navigate to the URL
- Take a screenshot
- Check for horizontal overflow (common layout bug indicator)
- Stop the session
- 1000 free minutes/year included
- After that: ~$0.17/minute
- Typical test: 2-3 minutes = ~$0.50
Currently configured for iPhone 13 (iOS 16.0.2). To test on different devices, modify DEVICE_ARN in ios-safari-test.py.
List available devices:
aws devicefarm list-devices --region us-west-2 --profile device-testing \ --filters '[{"attribute":"PLATFORM","operator":"EQUALS","values":["IOS"]}]' | \ jq '.devices[] | {name, os, arn}'Session timeout: Sessions auto-terminate after 5 minutes of inactivity. The script handles this by stopping the session after each test.
Internal error: The Appium endpoint URL is time-sensitive. The script fetches a fresh endpoint each time.