about Calabash for iOS

70 Views Asked by At

I have a code:

wait_for(options) do
    views = query("view marked:'al_activity_controller'")
    foundedView = views.first;
    views.count != 0 #return value for "wait_for" block
    calabash_warn("tap on activity")
end

if I comment the line calabash_warn("tap on activity") all works fine.

In other case I never leave wait_for block. And I got timeout. Why so?

As I know calabash_warn have return type void.

1

There are 1 best solutions below

0
On

The Calabash wait_for* methods wait for the last statement to eval to true, otherwise they timeout. The calabash_warn method does not have a defined return type, so it never returns true.

Just a heads up, the calabash_warn method is slated for deprecation as public method.