如何滚动UITable视图,直到我看到一个标签为“值”的单元格在卡拉巴什 [英] How do i scroll a UITable view down until i see a cell with label "Value" in Calabash

查看:227
本文介绍了如何滚动UITable视图,直到我看到一个标签为“值”的单元格在卡拉巴什的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何向下滚动UITableView,直到在葫芦/黄瓜中看到标签为值的单元格。
我一直在尝试使用:

How do i scroll a UITableView down until i see a cell with label "Value" in Calabash/Cucumber. I've been trying to do it using:

      Then I swipe down until I see "Value"

并使用:

      Then I scroll down until I see "Value"

。谢谢!

当我尝试使用上面显示的消息显然是:

The message I get when I try with the above is obviously:


您可以使用这些
代码片段来实现未定义步骤的步骤定义:

You can implement step definitions for undefined steps with these snippets:

然后(/ ^我向下滑动,直到看到 $ /)do | arg1 | pending#
用您希望结束的代码表达上述正则表达式

Then(/^I swipe down until I see "(.*?)"$/) do |arg1| pending # express the regexp above with the code you wish you had end


推荐答案

添加步骤定义

Then /^I scroll to cell with "([^\"]*)" label$/ do |name|
    wait_poll(:until_exists => "label text:'#{name}'", :timeout => 20) do
    scroll("tableView", :down)
    end
end

添加到ProjectName / features / step_definitions / my_first_steps.rb ruby​​文件和
在您的葫芦岛脚本中添加

to the ProjectName/features/step_definitions/my_first_steps.rb ruby file and In your calabash script add

Then I scroll to cell with "AAA" label

它对我很好。

这篇关于如何滚动UITable视图,直到我看到一个标签为“值”的单元格在卡拉巴什的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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