There's a waitForInvalid() but what about a waitForValid() function? For some reason, push/popTimeout doesn't work for me in many cases. Apple?
If the element is "valid" but not "visible" that might return too early. This should wait until its visible and valid.
UIATarget.localTarget().pushTimeout(20);
window.navigationBar().name()["Welcome"].withValueForKey(1, "isVisible");
UIATarget.localTarget().popTimeout();
or
UIATarget.localTarget().pushTimeout(20);
window.navigationBar().name().firstWithPredicate("name is 'Welcome' and isVisible == '1'")
UIATarget.localTarget().popTimeout();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With