Important information about using wait steps
All find actions in mabl, including assertions and clicks, will automatically wait up to 30 seconds for the targeted element to appear. There is generally no need to add an additional wait step before an assertion or another find action, unless the element will take more than 30 seconds to appear in your app, or if the element comes into existence without being fully realized. In the latter case, a wait step before the assertion may be necessary as mabl will evaluate as soon as it detects that the target element exists.
- Make sure the mabl Trainer is open in your window.
- Look for the toolbar at the bottom, finding the "Insert Step" option.
- Click the button.
- A new screen in the Trainer will appear with various features.
- Find and click the "Wait" button on this screen in the mabl Trainer.
- Two options for adding "wait" and "wait until" steps will appear.
- Select "wait" and enter the desired number of seconds into the text box provided.
- Click "OK" to finish.
Maximum wait time for a wait step is 900 seconds (15 minutes)
- You will be returned to the main trainer page, with the new wait step appearing in the "Steps" box.
Wait until steps can be found in the Trainer by following steps 1-6 in this guide. These steps tell mabl to wait up to 15 minutes for a specific element to be present, allowing you to ensure that your application is in the right state before executing subsequent steps. Wait until steps are less static than wait steps and less rigid than using CSS and XPath queries to find an element. Utilize these steps to specify the timeout and the attributes that mabl should wait for before attempting to auto-heal.
- Follow steps 1-6 above to add a wait until step to your test.
- Click on the cursor to select the element you would like to wait for.
- Select "OK" once finished.
- Select the attributes that mabl should search for. The value for an attribute can be modified by selecting the pencil icon. Once you have selected the target attributes, click "Next".
In addition to selecting attributes of the target element, you can also specify attributes of the element that the target is contained in. This container may also be referred to as an ancestor element.
- Enter timeout, and tell mabl if it should auto-heal. If the auto-heal option is selected, mabl will attempt to find a matching element even if it can't find an element using the configurable attributes.
- You will be returned to the main trainer page, with the new wait until step appearing in the "Steps" box. The selected attributes can be seen by hovering over "View criteria". The step can also be edited by clicking on the "View criteria" badge.
Existing steps can also be modified to become wait until steps. These steps can become a wait until step by using the "Configure find" option in the "More actions" menu and following steps 4-6 above for adding a wait until step.
Updated 6 months ago