What is the best way to expect an async element?

Hey guys :grinning:

What is the best way to expect an async element? I have a button that makes a request which generates another element, but katalon is faster than the request. I already used the WebUI.delay() function, but I found it to be a poor way to do it.

you want to wait for the element dynamically added into the HTML. Specify enough timeout; e.g. 10 seconds.

The “verify…” keyword will throw an Exception when the target HTML element does not appear in the page when the specified timeout expires.

The “wait…” keyword will not throw an Exception. It returns boolean value true/false. You can treat the result in the way as you want to.

3 Likes