我试图在calabash-android中向下滚动,但不能。
在特征文件中:
Then I scrolldown until I see "Engine Light On"在calabash_steps.rb中:
Then /^I scroll until I see the "([^\"]*)" text$/ do |text| q = query("TextView text:'#{text}'") while q.empty? scroll_down q = query("TextView text:'#{text}'") end end
我得到的错误是:

发布于 2017-03-30 13:18:55
我们可以在calasbash_steps.rb文件中使用以下代码。
Then(/^I scroll view "([^"]*)" "([^"]*)"$/) do |view,direction|
scroll("#{view}",:"#{direction}")
end在.feature文件中,我们可以以希望scroll.Here的方式传递视图和方向,这是一个示例:
Then I scroll view "ExpandableListView" "down"
Then I scroll view "ExpandableListView" "up"https://stackoverflow.com/questions/42968383
复制相似问题