如何从UIImagePickerController使用Frank Cucumber选择图片? [英] how to select a picture from UIImagePickerController using Frank Cucumber?

查看:192
本文介绍了如何从UIImagePickerController使用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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆