When testing an application across multiple tabs, it can sometimes be challenging to ensure the test interacts with the correct tab. To assist with this effort, we've added the ability to use Configure Find for "Await tab" steps. This enhancement makes it possible to test applications that open new tabs with dynamically generated titles or URLs.
How it works
When you train a browser test that opens a page in a new tab, mabl automatically generates an "Await tab" step. Upon interacting with the page in the new tab, mabl automatically adds another step: "Switch context."
Switching to a new tab
To use Configure Find for an "Await tab" step, take the following steps:
- Hover over the "Await tab" step
- Click on ... (More actions) > Configure Find
- Select the attributes that the tab must meet. You may alter the value of the selected attributes, such as using variables for dynamically generated titles and URLs.
- Click OK to confirm your changes.
When the "Await tab" step runs, the new tab must match the conditions set by Configure Find. If no tab matches those conditions, the "Await tab" step fails.