Mabl automatically attempts to dismiss popups that open on a page during testing. If you're testing against a changing application with newly added or removed popups, automatic popup dismissal helps ensure your mabl tests don't fail.
This article explains how mabl interacts with two types of popups: browser dialogs and in-app popups.
Browser dialogs include basic auth popups, browser permission popups, and window prompts, such as window.alert(), window.confirm(), and window.prompt().
Example of a browser dialog
Browser dialogs are not part of the webpage's HTML. For this reason, the mabl Trainer cannot capture interactions with browser dialogs.
- Basic auth: see the article on basic auth for more information on how to test applications that use basic auth popups.
- Browser permission popups: during training, local runs, and cloud runs, the browser is configured as if the user had already allowed requests for information from the user, including geolocation and notification popups. For geolocation popups, coordinates are automatically set to the data center where the browser is being executed.
- Window prompts: During training, local runs, and cloud runs, mabl automatically dismisses window prompts, such as window.alert(), window.confirm(), and window.prompt().
In-app popups are elements that appear over elements on the page. Modals, tooltips, or dropdown navigation are all examples of in-app popups.
Example of an in-app popup
In-app popups are part of the webpage's HTML. For this reason, the mabl Trainer can record steps that interact with in-app popups.
During cloud runs, if a step interacts with an element that is blocked by another element, such as a modal or dropdown, mabl identifies the blocking element as a popup and attempts to dismiss it.
Automatic popup dismissal in action