This article explains what happens when you train browser tests that interact with different tabs.
Training in new tabs
When you click on a link that opens a page in a new tab, the mabl Trainer automatically adds a step that waits for the tab to open. To start testing in the new tab, create an assertion or click on an element. The Trainer automatically detects that you switched to the new tab and adds a switch context step before the recorded steps.
If you start recording steps on the initial tab, the Trainer adds another step to switch context back to the initial tab before your recorded steps.
Training interactions in different tabs
Limitations
The mabl Trainer does not support the following methods for opening a new tab:
- CTRL + T or ⌘+T keypress steps
- CTRL + click or ⌘+ click
Testing in tabs with dynamic titles or URLs
If you are testing an application that opens new tabs with dynamically generated titles or URLs, update Configure Find settings for the "Await tab" step to match the dynamically generated title or URL of the new tab.