unable to run: calabash-ios sim reset

369 views
Skip to first unread message

Bill Davenport

unread,
Nov 9, 2012, 12:48:47 PM11/9/12
to calaba...@googlegroups.com
I'm not sure what I'm missing. I need to reset the simulator. However, I get an error when I run "calabash-ios sim reset"

$ calabash-ios sim reset
/Users/qa/.rvm/gems/ree-1.8.7-2012.02@ios/gems/calabash-cucumber-0.9.119/bin/calabash-ios-sim.rb:20:in `calabash_sim_reset': undefined local variable or method `app_bundle_path' for #<Object:0x108587290> (NameError)
from /Users/qa/.rvm/gems/ree-1.8.7-2012.02@ios/gems/calabash-cucumber-0.9.119/bin/calabash-ios-sim.rb:19:in `each'
from /Users/qa/.rvm/gems/ree-1.8.7-2012.02@ios/gems/calabash-cucumber-0.9.119/bin/calabash-ios-sim.rb:19:in `calabash_sim_reset'
from /Users/qa/.rvm/gems/ree-1.8.7-2012.02@ios/gems/calabash-cucumber-0.9.119/bin/calabash-ios:63
from /Users/qa/.rvm/gems/ree-1.8.7-2012.02@ios/bin/calabash-ios:19:in `load'
from /Users/qa/.rvm/gems/ree-1.8.7-2012.02@ios/bin/calabash-ios:19
from /Users/qa/.rvm/gems/ree-1.8.7-2012.02@ios/bin/ruby_noexec_wrapper:14

Krukow

unread,
Nov 9, 2012, 2:41:26 PM11/9/12
to calaba...@googlegroups.com
Aw... 

Sorry, that broke with a previous release of ios-sim.
I have a pending pull request for Sim-Launcher to fix this.


You'll have to wait :( In the mean time, I should probably give a better error msg!

Cheers,
- Karl 

Bill Davenport

unread,
Nov 9, 2012, 2:47:12 PM11/9/12
to calaba...@googlegroups.com
Great, thanks!

Bill Davenport

unread,
Dec 19, 2012, 11:26:59 AM12/19/12
to calaba...@googlegroups.com
I updated the applescript locally, thought I'd share. I realize this may only work on certain machines.

tell application "System Events"

do shell script "open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\\ Simulator.app/"

delay 2

tell process "iOS Simulator"

set frontmost to true

tell menu bar 1

tell menu bar item "iOS Simulator"

tell menu "iOS Simulator"

click menu item "Reset Content and Settings…"

end tell

end tell

end tell

delay 1

perform action "AXRaise" of window 1

tell window 1

click button "Reset"

end tell

end tell

end tell

tell application "iPhone Simulator" to quit



On Friday, November 9, 2012 2:41:26 PM UTC-5, Krukow wrote:

Krukow

unread,
Dec 20, 2012, 1:50:34 AM12/20/12
to calaba...@googlegroups.com
Great! Thanks.

- Karl

John Bateman

unread,
Jun 3, 2013, 1:14:16 PM6/3/13
to calaba...@googlegroups.com
Is  the method   calabash-ios sim reset
still not working? The response I get is: /<path to project>/gems/calabash-cucumber-0.9.144/bin/calabash-ios-sim.rb:19:in `calabash_sim_reset': undefined method `reset' for #<SimLauncher::Simulator:0x007f86c1269d60> (NoMethodError)

I will clone the applescript solution presented here, but was wondering if "sim reset" is/will be a supported method again?

Thanks.

Krukow

unread,
Jun 4, 2013, 1:52:21 PM6/4/13
to calaba...@googlegroups.com
This should work from 0.9.147.
Reply all
Reply to author
Forward
0 new messages