How do i scroll a UITable view down until i see a cell with label quot;Valuequot; in Calabash(如何向下滚动 UITable 视图,直到看到带有标签“值的单元格?(葫芦))
问题描述
如何向下滚动 UITableView,直到在 Calabash/Cucumber 中看到带有Value"标签的单元格.我一直在尝试使用:
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"
但它们似乎都不起作用.谢谢!
but none of them seem to work. Thanks!
当我尝试使用上述内容时,我得到的消息显然是:
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|待办的 #用你希望结束的代码表达上面的正则表达式
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 视图,直到看到带有标签“值"的单元格?(葫芦)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何向下滚动 UITable 视图,直到看到带有标签“值"的单元格?(葫芦)


- 使用自定义动画时在 iOS9 上忽略 edgesForExtendedLayout 2022-01-01
- 在测试浓缩咖啡时,Android设备不会在屏幕上启动活动 2022-01-01
- 用 Swift 实现 UITextFieldDelegate 2022-01-01
- android 4中的android RadioButton问题 2022-01-01
- Android - 拆分 Drawable 2022-01-01
- Android viewpager检测滑动超出范围 2022-01-01
- 想使用ViewPager,无法识别android.support.*? 2022-01-01
- 如何检查发送到 Android 应用程序的 Firebase 消息的传递状态? 2022-01-01
- Android - 我如何找出用户有多少未读电子邮件? 2022-01-01
- MalformedJsonException:在第1行第1列路径中使用JsonReader.setLenient(True)接受格式错误的JSON 2022-01-01