Showing results for 
Show  only  | Search instead for 
Did you mean: 
Dynatrace Helper
Dynatrace Helper

In some cases, the application triggers the popup which seems to be intermittent. During browser click path record, we may the record the click event to close the popup. However this popup appear intermittent and we may get the intermittent errors.

To avoid this, we can add the conditional JavaScript code with help of JavaScript Event to close the popup whenever it founds. You can follow the below steps on this case,

  1. Go to the relevant page on Chrome browser

  2. Right click on the element which you want to interact with on the popup page-> Inspect the element which will open the developer tools



  3. Check the element tag and attributes and write a JavaScript code like which will check the length of the element and if its greater than 0 then it will perform the click else it will go for further actions on Browser click path monitors.

    if(document.querySelectorAll('button[class="btn cancel"]').length>0) // For example on this page, element tag is button and attribute is class="btn cancel" . You can modify this based on your application page.
     document.querySelector('button[class="btn cancel"]').click();


  4. Add this JavaScript code into the JavaScript Event of your Browser click path monitor as shown in the below image,image3.png

Version history
Last update:
‎06 Apr 2023 06:34 PM
Updated by:
DynaMight Legend
DynaMight Legend

great write up thank you!