Sunday, July 29, 2012

iOS UI Automation Test -- Select image when using carema

When we doing a UI Automation Test in iPhone Simulation, and we would like to test the camera function.

At this point, the way is to store the image which we want to scan to iphone simulation photo library , and then pop up the image library when use camera simulation.


In the simulator, it said "Tap and hold with two fingers to select image", here is the code to do that

targt.tapWithOptions({x:0.27,y:0.45},{touchCount:2, tapCount:1,duration;1.5});


this code will pop up the photo library.




And here is the UIAElement Class Reference from Apple 


UIAElement Class Reference Link

No comments:

Post a Comment