How do I select an image from a UIImagePickerController using Frank Cucumber?

I was trying to use the BDD technique to test Frank's image import process in the iPhone Simulator.

The problem is that I cannot name the last step of selecting an image from the UIImagePickerControllerSourceTypePhotoLibrary (launching the UIImagePickerController was very simple, using the "touch" buttons on the button).

It always gets stuck in the process when I can see the saved images in the Simulator. Frank Symbiote said that the object I want to wear is a PLAlbumViewCell object.

+1


source to share


2 answers


I just figured it out today, basically PLAlbumView inherits from UITableView, so I created my own step definition to select the first photo.



When /^I select the first photo$/ do
  frankly_map( "tableView", "touchx:y:", '10', '10' )
end

      

+3


source


images = frankly_map( "view:'PUPhotosGridCell'", 'tag' )
  if images.count > 0
    touch ("view:'PUPhotosGridCell' first")
  end

      



I used the above lines of code to select the first image from the UIImagePickerController.

+1


source







All Articles