I have the following error. When I open the site I want to monitor with ASM, a banner (about data privacy) appears intermittently. Sometimes it appears, and at the next check of the tool configured in 5 min, it doesn't appear. As a result, the saved webdriver script generates an error. How can I fix this?
This is a customization
You need to use runscript command
First you have to physically trap and get the element id and then port that into the runscript command as per the documentation - WebDriver if-else Branching and JavaScript
Without that element id, you'll never capture the popup
The steps on how to do this are:
1. Using an incognito browser window, open up developer tools
2. Go to the site you want to monitor and go through the steps to trigger the intermittent popup.
3. Once you receive the popup, inspect the popup in developer tools and take the element ID
4. Using Katalon recorder, insert a runscript command and write javascript code to check for that element ID and if found, then click on ok or X or whatever is necessary to dismiss the popup. If you do not receive it, then have the javascript code proceed onto the next step
This is going to be a trial and error on your side. Without that popup element ID coded into your Webdriver script, the ASM Monitor is not going to work properly.