2017-03-23 13 views
0

나는 호리병박 안드로이드에서 아래로 스크롤하려고하고 있지만 할 수 없었다. calabash_steps.rb에서호리 호리하고 안드로이드에서 스크롤

Then I scrolldown until I see "Engine Light On" 

: 나는 점점 오전

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

오류 :

는 여기에 내가 기능 파일에서 스크롤 부분

에 사용하는 코드입니다

enter image description here

답변

0

calasbash_steps.rb 파일에서 다음 코드를 사용할 수 있습니다.

Then I scroll view "ExpandableListView" "down" 
Then I scroll view "ExpandableListView" "up" 
다음 .feature 파일에서
Then(/^I scroll view "([^"]*)" "([^"]*)"$/) do |view,direction| 
    scroll("#{view}",:"#{direction}") 
end 

, 우리는 당신이 scroll.Here에 원하는 방식으로보기 및 방향을 전달할 수있는 것은 샘플입니다