I am doing android app test automation using Cucumber-Appium in ruby.
I want to write a wait function which should wait till the next page is shown.
I tried few ways but it is not working.
And (/^I wait till '(.*)' appears$/) do |next_page| $i=1 while $i==1 do if ObjectSpace.const_get('next_page').new.identity? $current_page = $current_page.change_page('next_page') $i=0 else wait_secs(1) end end
Can any one suggest something?