-
Notifications
You must be signed in to change notification settings - Fork 368
Closed
Description
uia('uia.alert().defaultButton().tap()') command fails on 8.0 simulator with an error. Same command works fine in 7.1 simulator.
Environment:
Calabash 0.11.0
run_loop 1.0.9
Xcode 6.0.1
iPad Retina (8.0 Simulator)
Steps to reproduce:
- Build app to
iPad Retina 8.0 simulator
- Execute:
DEBUG=1 DEVICE_TARGET='iPad Retina (8.0 Simulator)' calabash-ios console
- Execute:
start_test_server_in_background
- Open alert view in your app
- Execute:
uia('uia.alert().defaultButton().tap()')
Expected result:
5. Command is executed successfully and default button is tapped in alert view
Actual result:
5. Command fails with an error
Console trace:
janis-air:myApp janijegoroff$ DEBUG=1 DEVICE_TARGET='iPad Retina (8.0 Simulator)' calabash-ios console
Running irb...
irb(main):001:0> start_test_server_in_background
INFO: Using uia strategy: 'preferences'
Sending 'QUIT' to instruments process '78036'
Waiting for instruments '78036' to terminate
Preparation took 3.135206 seconds
{
:app => "/Users/janijegoroff/Library/Developer/Xcode/DerivedData/myApp-civuqgdjemtasdaqyhpsrgakmnyv/Build/Products/Calabash-iphonesimulator/myApp.app",
:args => [],
:bundle_dir_or_bundle_id => "/Users/janijegoroff/Library/Developer/Xcode/DerivedData/myApp-civuqgdjemtasdaqyhpsrgakmnyv/Build/Products/Calabash-iphonesimulator/myApp.app",
:bundle_id => "my-bundle-id",
:device => "iphone",
:device_target => "iPad Retina (8.0 Simulator)",
:launch_method => :instruments,
:launch_retries => 5,
:log_file => "/var/folders/66/62hrz8650r72_srksbdfwpjm0000gn/T/run_loop20141014-78698-x42grc/run_loop.out",
:no_launch => false,
:no_stop => false,
:reset => false,
:results_dir => "/var/folders/66/62hrz8650r72_srksbdfwpjm0000gn/T/run_loop20141014-78698-x42grc",
:results_dir_trace => "/var/folders/66/62hrz8650r72_srksbdfwpjm0000gn/T/run_loop20141014-78698-x42grc/trace",
:script => "/var/folders/66/62hrz8650r72_srksbdfwpjm0000gn/T/run_loop20141014-78698-x42grc/_run_loop.js",
:sdk_version => nil,
:udid => "iPad Retina (8.0 Simulator)",
:uia_strategy => :preferences,
:xcode => "6.0.1",
:xcode_path => "/Applications/Xcode601/Xcode.app/Contents/Developer"
}
### Starting on iPad Retina (8.0 Simulator) App: /Users/janijegoroff/Library/Developer/Xcode/DerivedData/myApp-civuqgdjemtasdaqyhpsrgakmnyv/Build/Products/Calabash-iphonesimulator/myApp.app ###
2014-10-14 11:18:45 +0100 xcrun instruments -w "iPad Retina (8.0 Simulator)" -D "/var/folders/66/62hrz8650r72_srksbdfwpjm0000gn/T/run_loop20141014-78698-x42grc/trace" -t "Automation" "/Users/janijegoroff/Library/Developer/Xcode/DerivedData/myApp-civuqgdjemtasdaqyhpsrgakmnyv/Build/Products/Calabash-iphonesimulator/myApp.app" -e UIARESULTSPATH /var/folders/66/62hrz8650r72_srksbdfwpjm0000gn/T/run_loop20141014-78698-x42grc -e UIASCRIPT /var/folders/66/62hrz8650r72_srksbdfwpjm0000gn/T/run_loop20141014-78698-x42grc/_run_loop.js &> /var/folders/66/62hrz8650r72_srksbdfwpjm0000gn/T/run_loop20141014-78698-x42grc/run_loop.out
Launching took 7.274896 seconds
Calabash::Cucumber::Launcher: Launch Method instruments
Log file: /var/folders/66/62hrz8650r72_srksbdfwpjm0000gn/T/run_loop20141014-78698-x42grc/run_loop.out
irb(main):002:0> uia('uia.alert().defaultButton().tap()')
{
"status" => "error",
"value" => "VerboseError: Cannot perform action on invalid element: UIAElementNil from target.frontMostApp().alert().defaultButton()",
"backtrace" => "tap@[native code]\neval code\neval@[native code]\nglobal code@file:///Users/janijegoroff/myApp/66BB437F-FB56-467A-9C62-34F50B6747FC/_run_loop.js:23632:27",
"index" => 0
}
irb(main):003:0>
run_loop trace:
janis-air:myApp janijegoroff$ cat /var/folders/66/62hrz8650r72_srksbdfwpjm0000gn/T/run_loop20141014-78698-x42grc/run_loop.out
Waiting for device to boot...
2014-10-14 10:18:52 +0000 Default: OUTPUT_JSON:
{"status":"success","value":true,"index":0}
END_OUTPUT
2014-10-14 10:18:52 +0000 Default: **************
2014-10-14 10:19:12 +0000 Default: OUTPUT_JSON:
{"output":{"output":"on alert"},"last_index":0}
END_OUTPUT
2014-10-14 10:19:12 +0000 Default: **************
2014-10-14 10:19:23 +0000 Default: OUTPUT_JSON:
{"output":{"output":"alert: null"},"last_index":0}
END_OUTPUT
2014-10-14 10:19:23 +0000 Default: **************
2014-10-14 10:19:27 +0000 Default: index 0 is command: uia.alert().defaultButton().tap()
2014-10-14 10:19:27 +0000 Debug: Cannot perform action on invalid element: UIAElementNil from target.frontMostApp().alert().defaultButton()
2014-10-14 10:19:27 +0000 Default: OUTPUT_JSON:
{"output":{"output":"Failure: VerboseError: Cannot perform action on invalid element: UIAElementNil from target.frontMostApp().alert().defaultButton() tap@[native code]\neval code\neval@[native code]\nglobal code@file:///Users/janijegoroff/myApp/66BB437F-FB56-467A-9C62-34F50B6747FC/_run_loop.js:23632:27"},"last_index":0}
END_OUTPUT
2014-10-14 10:19:27 +0000 Default: **************
2014-10-14 10:19:27 +0000 Default: Write result...
2014-10-14 10:19:27 +0000 Default: Check successful storage...
2014-10-14 10:19:27 +0000 Default: Storage succeeded: 0
janis-air:myApp janijegoroff$