set_preferences() not working on Android 4.X

35 views
Skip to first unread message

vidhi thakrar

unread,
Apr 21, 2015, 1:35:15 AM4/21/15
to calabash...@googlegroups.com
Hi,

We are using calabash for our Automation and we are setting environment for application before application starts by using below code snippet from Before:

set_preferences("KEY_ENVIRONMENT", "AUTOMATION")

This works perfectly fine on Android 5.X but it's giving below error on Android 4.X

Could not set preferences (RuntimeError)
 /Users/vidhithakrar/.rvm/gems/ruby-2.1.1@loganberry/gems/calabash-android-0.5.8/lib/calabash-android/operations.rb:755:in `set_preferences'
 /Users/vidhithakrar/.rvm/gems/ruby-2.1.1@loganberry/gems/calabash-android-0.5.8/lib/calabash-android/operations.rb:177:in `set_preferences'
 /Users/vidhithakrar/Workspace/automation/feature_steps/droid/support/app_life_cycle_hooks.rb:23:in `Before'

If I put some sleep before calling set_preferences() then it works fine on Android 4.X sometimes.
Reply all
Reply to author
Forward
0 new messages