Skip to content

Popup Blocker

RobertAvemarg edited this page Dec 13, 2024 · 3 revisions

PopUp Blocker

When testing web applications PopUps are an essential part. But for testing, it might be necessary to automatically close certain popups off in order to ensure a good flow of the test execution. For this we have implemented a JavaScript based in-page PopUp blocker.

We highly recommend to make sure that the PopUps in your tested application are deterministic and can be handled cleanly within you test flows. However, this is not always possible, especially if you have no control over the tested application, but have to use it as a blackbox. In these cases automatically closing PopUps with this feature will help making your tests more stable and reduce execution time.

In order to use it you need to provide a CSS selector of an element which would close the PopUp if clicked upon. Simply store this in the properties with a custom key. For example like this:

neodymium.popup.customPopUp = #myWindow

This will trigger an automatic search for this specific element. And it will be clicked as soon as it is found. The interval in which the search is triggered can be configured with the neodymium.popupInterval property.

Clone this wiki locally