Thursday, 11 April 2013

Adb command sequence to take picture and save it

there are list of ruby commands that can be used in calabash-android to get pciture from camera and save it

I had this problem running commands from calabash to take pciture, I was able to get past it using these 2 functions

def takePicFromCamera
   system('adb shell input keyevent 27') # click take picture button

  # save picture by clicking on save
  def savePicture
    system('adb shell input keyevent 21') # waitfor 2 second
    system('adb shell input keyevent 22') # select save # waitfor 2 second
    system('adb shell input keyevent 23') # Click save # waitfor 5 second

1 comment:

  1. Best place to learn Appium Android IOS Automation Testing Training in Chennai
    Go for Appium training in chennai for real time mobile automation testing training with real time project support.
    UI Automation Tools with real time scenarios You can contact 8122241286 for Best APPIUM and selenium Training in Chennai