On iOS < 7 you can use the calabash-ios gem from the irb to record touches and other gestures and playback later in steps.
In iOS 7, Apple removed the playback features of UIAutomation. If you found this feature of calabash-ios useful, please file a bug report with Apple. https://bugreport.apple.com/
The replacement for recordings in iOS 7 are the uia_* family of functions that provide a bridge to the UIAutomation scripting language.
If you are targeting iOS < 7
- launch your app in the simulator or device
open an calabash console (AKA irb)
$ calabash-ios console > record_begin #### perform your gestures on the simulator or device > record_end 'my_special_gesture' # test that it worked > playback 'my_special_gesture'
- you can use your gesture in a step Then(/^I do my special gesture$/) do playback 'my_special_gesture' end
In the calabash-android, the record_begin
and record_end
methods are not yet implemented.