Summary: The Dynatrace Synthetic Recorder extension doesn’t support recording shadow DOM elements. To accommodate this, the locator must be updated in the Browser clickpath.
Problem
After recording a Browser clickpath, some events fail with errors like ‘1502 - The html element could not be found to perform action’. On inspecting the element, it is found that it is within a ShadowDOM, #shadowroot.
Resolution
-
Go to the relevant page on a Chrome browser
-
Right-click on the element that you want to interact with on the page and select Inspect. This will open the element in the developer tools
-
Right-click on the element on the Web developer tools - > Copy - > Copy JS path
-
Add this copied DOM selector into your synthetic script events as a type of DOM selector.
What’s Next
If this doesn’t work, it may be that you need to try a different locator or to fire some events, see How to perform click event with help of Javascript on browser click path synthetic monitor incase of…, or try using an XHR locator instead, How to add an XPath locator in a Browser Clickpath Monitor script
If you still need assistance, open a chat or support ticket and provide a link to the affected monitor and explain what your are trying to do and what you have already tried.
What to read next:

How to perform a click event using Javascript on browser clickpath synthetic monitors

How to add an XPath locator in a Browser Clickpath Monitor script

How to add the DOM selector on Browser click path monitors with the Dynamic iframes scenarios

