Starting with mabl Desktop App version 2.72.1, you can set an equals or contains assertion to wait for an element's value to match before it fails. Use this new wait option when the value you're validating takes a moment to settle after the element appears, such as a cart total that recalculates, a status that moves from "Processing" to "Complete", or a count that loads asynchronously.
Try it out
- In the Trainer, add a new wait step: + (Add step) > Wait.
- Select Add wait until value matches.
- Pick the element on the page, choose equals or contains, and enter the expected value.
- Adjust Wait up to (seconds) for this to be true if needed. The field starts at 15 seconds, and any value from 1 to 900 seconds works.
You can also add a wait to an existing equals or contains assertion by editing the step and filling in the same field. Steps with a wait show "(waits up to N s)" in the step list and in run results.
When the mabl agent authors a test, it can add the same kind of wait, and you can review and edit it in the Trainer.
Value waits apply to equals and contains assertions in browser tests. Comparisons such as "does not equal" or "starts with" are evaluated once. To wait for an element to appear or disappear, keep using a Wait until step.