如何从UIImagePickerController使用Frank Cucumber选择图片? [英] how to select a picture from UIImagePickerController using Frank Cucumber?
问题描述
我在尝试使用BDD技术在iPhone模拟器中使用 Frank 检查导入图片过程。
I was trying to use BDD technique to check the import picture process using Frank in the iPhone Simulator.
问题是,我无法调用从UIImagePickerControllerSourceTypePhotoLibrary源选择图像的最后一步(使用touch命令在按钮上启动UIImagePickerController非常简单) 。
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.
推荐答案
我只是排序今天,基本上PLAlbumView继承自UITableView,所以我创建了一个自定义步骤定义来选择第一张照片。
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
这篇关于如何从UIImagePickerController使用Frank Cucumber选择图片?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!