문제

I want my calabash tests in iOS to run for a certain number of steps then stop at a certain line

Is there a 'sleep', 'pause' or 'stop' command?

도움이 되었습니까?

해결책

According to the calabash documentation, there is a sleep method, but there are also a few wait methods, which are recommended over sleep. From the wiki:

Notes: Waiting for a condition to occur is superior to using the sleep function. With sleep you end up either specifying too long waits which slows the test down or you become sensitive to timing issues. Sometimes you do need sleep (to wait for animations to complete), but try to use waiting as much as possible.

다른 팁

You can use:

sleep(10) #seconds

or

wait_for_elements_exist(elements, 
    {
     :timeout => 10, #seconds
     :retry_frequency => 1, #time to retry in seconds
     :timeout_message => "Timeout message" 
    }
)

For sleep, use,

sleep(10) - This sleeps after 10 seconds.

For stop, use,

calabash_exit - This should be used in the console.

For pause, use,

sleep(STEP_PAUSE) - This is predefined.

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