Skip to content

Popup Blocker

Bernd Weigel edited this page Dec 3, 2024 · 2 revisions

PopUp Blocker

When testing web applications PopUps are an essential part. But for testing it might be necessary to automatically close certian popups off in order to enssure a good flow of the testexecution. 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 controll over the tested application, but have to use it as a blackbox. In this 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 triggerd can be configured with the neodymium.popupInterval property.

Clone this wiki locally