Appium : Is there a way to automate taking pictures from native IOS camera


#1

Is there a way to automate taking pictures from native ios Camera


#2

@ypotluri i have automated of taking pre-defined images with Simulator. if it is you are looking for -> ping


#3

Hi ,

Yes , can you please share


#4

@ypotluri

  1. to clear all data with simulator use in driver start:
capabilities.setCapability(MobileCapabilityType.FULL_RESET, true);
  1. to push file into simulator use “xcrun simctl addmedia your_deviceOrSimuloator_UDID path_to file”. file will be added to gallery.

Now you can test in Simualtor with Camera functionality of your client. It will open gallery instead and you can just choose some image you just uploaded into it.


#5

Can you please provide more details / code snippet related to point 2.

  1. to push file into simulator use “xcrun simctl addmedia your_deviceOrSimuloator_UDID path_to file”. file will be added to gallery.

#6

@Bala_A not needed any more. with latest Appium Java client and Appium server there is
http://appium.io/docs/en/commands/device/files/push-file/


#7

Is it wokable in appium studio also ? Please let me know. I need to inject image in my app.


#8