Capture image using Camera with iOS and appium

1.9k Views Asked by At

I am automating a test where we need to launch camera app , and capture some images/videos. Those captured images/videos will be saved in media library. Now Since 1. On real iOS device we can not automate camera app using appium, I thought to write and iOS app which will launch Camera , till this step it is fine, I could launch camera but the capture button not be clicked using appium.

Do we have any other way to launch a camera on iOS device using appium and capture some images ?

1

There are 1 best solutions below

1
On

Part of Apples security model is the Sandbox. You can only play within your own sandbox. Since the camera app is it's own entity you will not have any control over it once it is launched and can not provide testing code to control it.

You will need to either write your own camera control module which you can then control to take pictures using your test tool or you can pre-populate the device with your required images.