0

I am trying to add the line sleep(STEP_PAUSE) to my android calabash script and I am getting the following error

 uninitialized constant STEP_PAUSE (NameError)

Why is this not initialized and does anyone have the class list of constants, operators and methods that can be used in Calabash Android 0.5.5?

Here is the class list I found, but the search sucks and I can't find what i need: http://www.rubydoc.info/gems/calabash-android/Calabash/Android

Wondering if STEP_PAUSE was deprecated?

Here's what I'm trying to do. I am trying to wait for the app to launch and then open a side menu. Here is what I am using but its not always successful. Its like 90% effective

#open the menu
Then(/^I touch "(.*?)" menu$/)do |menu|
sleep(STEP_PAUSE)
wait_for_elements_exist(["* id:'action_bar_title'", "* text:'New courses'"], :timeout => 35.0)
touch("* id:'action_bar_title'")
end

Also note the timeout options for 35 seconds doesn't seem to ALWAYS work, but helped stabilize the script. Again only 90% of the time does it actually wait and work. This is why I am trying the SLEEP_PAUSE. SLEEP_PAUSE fixed a lot of things for me in iOS.

Laser Hawk
  • 1,988
  • 2
  • 23
  • 29
  • I wouldn't be surprised if STEP_PAUSE has been removed from Calabash, because using sleeps is strongly not recommended. Have you tried to add `:retry_frequency` and `:post_timeout` to your wait block/method instead? – kjuri Jan 07 '15 at 14:33
  • The :retry_frequency seems to be working 100% of the time. – Laser Hawk Jan 07 '15 at 18:26

0 Answers0