1

I was trying to use BDD technique to check the import picture process using Frank in the iPhone Simulator.

The problem is that I cannot call the last step of selecting an image from UIImagePickerControllerSourceTypePhotoLibrary source (launching the UIImagePickerController was very easy using "touch"-commands on a button).

It always stuck in the progress when I can see the saved images in the Simulator. The Frank Symbiote said the object I wanna touch is a "PLAlbumViewCell" object.

Vinh
  • 944
  • 13
  • 34

2 Answers2

3

I just sorted this out today, basically PLAlbumView inherits from UITableView so I created a custom step definition to select the first photo.

When /^I select the first photo$/ do
  frankly_map( "tableView", "touchx:y:", '10', '10' )
end
Smixx
  • 345
  • 1
  • 9
1
images = frankly_map( "view:'PUPhotosGridCell'", 'tag' )
  if images.count > 0
    touch ("view:'PUPhotosGridCell' first")
  end

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

Srinivas
  • 315
  • 3
  • 18