Loading spinners, overlays, and toast notifications often need to clear before a test can move on. Now, you can add a wait until not present step, which pauses your test until a matching element leaves the page.
Previously, the mabl Trainer could only wait for an element to appear, so waiting for one to go away meant either guessing at a static wait step or implementing a looping conditional that exited early once the element disappeared. With the new wait until not present step, you can eliminate tedious workarounds, optimize test execution time, and improve test readability.
Try it out
On the latest version of the mabl Desktop App, there are three different ways to add a step that waits until an element is not present. Use the method that works best for your situation.
If you can see the element on the screen
Get your application into the state where the spinner or overlay is showing. Open Insert a step, search for "wait", choose Add wait until not present, and select the element that needs to disappear.
If the element disappears before you can select it
If the element isn't on the page when you add the step, you can describe the element using a locator instead. Add a custom find step: + (Add step) > Find elements and enter a CSS selector, Playwright locator, or XPath expression in the Locator field. Set the Action to "Wait until not present", and specify how many seconds mabl should wait before the step fails.
If you can click on the element before it disappears
You can convert any recorded click step by clicking on the three-dot menu and selecting Wait until not present. mabl reuses the element from that step, so there's nothing to select again.
Saved steps read "is not present" in the step details, so you can tell at a glance which direction each wait is going.