Summary
Request to add a new API endpoint (e.g., /wda/device/install_media) that allows saving images to the device's Photo Library/Camera Roll so they can be recognized and accessed by the native Photos app.
Motivation
Currently, there's no way to save images directly to the device's Photo Library. This capability is essential for:
- Testing Photo Picker functionality - Apps that allow users to select photos from the library need test images available in the Photos app
- Testing image upload features - Many apps have image upload functionality that requires selecting images from the Photos app
- E2E testing workflows - Complete end-to-end testing of user journeys that involve photo selection and upload
- Automated test setup - Programmatically prepare test data (images) in Photo Library before running test suites
Current Problem
Currently, testers must manually add images to the simulator/device before running tests, which is:
- ❌ Time-consuming and cannot be automated
- ❌ Not reproducible across different test environments
- ❌ Makes CI/CD integration difficult
- ❌ Requires manual intervention for each test run
The only photo library-related code in WebDriverAgent is PHPhotoLibrary.requestAuthorization in FBAlertViewController.m, which only triggers the permission dialog but doesn't actually save any images.
Proposed Solution
Add a new API endpoint that accepts image data (base64-encoded) and saves it to the device's Photo Library, making it accessible through the native Photos app.
The saved images must:
- ✅ Be visible and accessible in the iOS Photos app
- ✅ Be selectable through UIImagePickerController or PHPickerViewController
- ✅ Appear in the Camera Roll or a designated album
- ✅ Have proper metadata (creation date, image format, etc.)
Use Cases
Scenario 1: Testing image upload in social media apps
- Need to add test images to Photo Library
- User taps "Upload Photo" button in app
- App opens native photo picker
- Test needs to select the previously added test image
Scenario 2: Testing profile picture update
- Add test avatar image to Photo Library
- Navigate to profile settings
- Select "Change Photo" → opens Photos app
- Select the test avatar from Photo Library
- Verify profile picture is updated
Scenario 3: CI/CD automated testing
- Test pipeline needs to run on fresh simulators
- Before tests run, programmatically add required test images
- Execute test suite that relies on photo selection
- Clean up after tests complete
We need equivalent functionality for iOS that makes images available in the Photos app.
Benefits
- ✅ Enables fully automated E2E testing of photo-related features
- ✅ No manual preparation needed for test environments
- ✅ Consistent and reproducible test data across environments
- ✅ Cross-platform parity with Android testing capabilities
- ✅ Aligns with WebDriverAgent's goal of comprehensive iOS automation
Thank you for considering this feature request!
Summary
Request to add a new API endpoint (e.g.,
/wda/device/install_media) that allows saving images to the device's Photo Library/Camera Roll so they can be recognized and accessed by the native Photos app.Motivation
Currently, there's no way to save images directly to the device's Photo Library. This capability is essential for:
Current Problem
Currently, testers must manually add images to the simulator/device before running tests, which is:
The only photo library-related code in WebDriverAgent is
PHPhotoLibrary.requestAuthorizationinFBAlertViewController.m, which only triggers the permission dialog but doesn't actually save any images.Proposed Solution
Add a new API endpoint that accepts image data (base64-encoded) and saves it to the device's Photo Library, making it accessible through the native Photos app.
The saved images must:
Use Cases
Scenario 1: Testing image upload in social media apps
Scenario 2: Testing profile picture update
Scenario 3: CI/CD automated testing
We need equivalent functionality for iOS that makes images available in the Photos app.
Benefits
Thank you for considering this feature request!