문제

I've recorded aand played back touches via IRB on the iphone simulator, but I couldn't find anything about how to record from an actual device. Is there any documentation to go through?

도움이 되었습니까?

해결책

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

  1. launch your app in the simulator or device
  2. 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'
    
  3. 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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top