on
12 Apr 2023
04:00 AM
- edited on
05 Dec 2025
10:03 AM
by
HannahM
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.
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.
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.
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
@Mareeswaran Thank you for sharing this! I'm sure it will help out many community members.