Take photo in Appium on ios real device - ios

I am struggling with taking ios photo. Is there any possibility to capture photo in iOS real device using Appium? I dont have access to shell and cannot send keys like on Android phone, I also have a problem with tapping on element related to capturing photography. It seems like it is not responding to any tapping/clicks. Is there any API/ way to automate capturing photos using real device camera in iOS?
Also I do not have a problem with picking photography from gallery or uploading it to the phone. I have a problem with clicking on a button responsible for taking photo.
I looked at the internet but most of the solutions are related to the Android phone (which I automated already).
Regards,
Toms

Related

How to take screenshot of a foreground appllication (like music) when screen is locked?

I am fairly new to iOS. I need your help.
Is is possible to take screenshot of an application (lets say Music) which is running in the foreground and when iOS device's screen is locked using a program? If so, can you please let me know the code correspondingly. (This is for personal work only)
The iOS APIs for taking screenshots are private, which means that you cannot programmatically take a screen shot of the phone. Also, since iOS apps are sandboxed, you do not have access to the Music app (or any other app), so you cannot capture an image of the view being presented.
However, if the user takes a screenshot, you can access that screen shot using PhotoKit by getting the latest image in the Screenshots smart album.

Take pictures using iPad's camera with Selenium and Appium

I am automating iOS application in iPad using Selenium and Appium.
The application has one feature where it opens iPad's default camera application and user can take picture from it.
The requirement is to automate this procedure. i.e. Capture picture using iPad's default camera and use it in application.
Is there any way to automate this?
As far as I know, you can't directly take pictures from your iPad with Selenium/Appium, but there is a tool named AVFoundation that allows you to do so.
There is some documentation about taking pictures
The programming language that is used is Objective-C.
Hope you'll find what you are looking for.

Take screenshot with Calabash iOS and save it to a physical device

Is it possible to take a screenshot on a physical device and save the picture on the device? Basically I'm looking for the same functionality of doing Home+Lock (which takes a photo of the screen).
I need this because I require to have stored a photo on the cellphone to interact with the integrated gallery of my program.
NO, There is no option to take screenshot of device lock screen.
No, There is no option to store screenshot in device.

Capture image using Camera with iOS and appium

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 ?
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.

how can i test my camera on xcode without a device (using output from simulator)?

I am making an ipad app which uses a camera. i do not have an ipad so i cannot test the app on a device. is there a way to figure out if the camera works by using the output from the simulator?
I'm afraid you're up a creek here. If memory serves all pure going to see is a black screen in simulator. I know it's covered in the developer library but since they're overhauling the portal I can't get to the exact verbiage. It specifically mentions the simulaor can't emulate the accelerometer or camera.

Resources