gpt4 book ai didi

iphone - 我如何向下滚动 UITable View ,直到我在 Calabash 中看到标签为 "Value"的单元格

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:50:46 25 4
gpt4 key购买 nike

如何向下滚动 UITableView,直到在 Calabash/Cucumber 中看到带有标签“Value”的单元格。 我一直在尝试使用:

      Then I swipe down until I see "Value"

并使用:

      Then I scroll down until I see "Value"

但它们似乎都不起作用。谢谢!

当我尝试上面的方法时,我得到的消息显然是:

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

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​​ 文件和在你的葫芦脚本中添加

Then I scroll to cell with "AAA" label

它对我来说工作正常。

关于iphone - 我如何向下滚动 UITable View ,直到我在 Calabash 中看到标签为 "Value"的单元格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16339676/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com