<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>article How to inspect and add shadow DOM elements into Browser clickpath script events. in Troubleshooting</title>
    <link>https://community.dynatrace.com/t5/Troubleshooting/How-to-inspect-and-add-shadow-DOM-elements-into-Browser/ta-p/209228</link>
    <description>&lt;P&gt;&lt;EM&gt;Summary: The Dynatrace Synthetic Recorder extension doesn't support recording shadow DOM elements.&amp;nbsp;To accommodate this, the locator must be updated in the Browser clickpath.&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;LI-TOC indent="15" liststyle="disc" maxheadinglevel="2"&gt;&lt;/LI-TOC&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2 id="toc-hId--705370114"&gt;Problem&lt;/H2&gt;
&lt;P&gt;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.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2 id="toc-hId-1032019071"&gt;Resolution&lt;/H2&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;Go to the relevant page on a Chrome browser&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;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&lt;/P&gt;
&lt;DIV id="tinyMceEditorMareeswaran_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="tinyMceEditorMareeswaran_3" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image1.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/10974iE86C649F3BB3BDA2/image-size/large?v=v2&amp;amp;px=999" role="button" title="image1.png" alt="image1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Right-click on the element on the Web developer tools - &amp;gt; Copy - &amp;gt; Copy JS path&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Add this copied DOM selector into your synthetic script events as a type of DOM selector.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV id="tinyMceEditorMareeswaran_2" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image3.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/10976i3132FA29910F7A04/image-size/large?v=v2&amp;amp;px=999" role="button" title="image3.png" alt="image3.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2 id="toc-hId--1520137890"&gt;What's Next&lt;/H2&gt;
&lt;P&gt;If this doesn't work, it may be that you need to try a different locator or to fire some events, see&amp;nbsp;&lt;A id="link_7" class="page-link lia-link-navigation lia-custom-event" href="https://community.dynatrace.com/t5/Troubleshooting/How-to-perform-click-event-with-help-of-Javascript-on-browser/ta-p/244503" target="_blank" rel="noopener"&gt;How to perform click event with help of Javascript on browser click path synthetic monitor incase of...,&lt;/A&gt;&amp;nbsp;or try using an XHR locator instead,&amp;nbsp;&lt;A style="background-color: #ffffff;" title="How to add an XPath locator in a Browser Clickpath Monitor script" href="https://community.dynatrace.com/t5/Troubleshooting/How-to-add-an-XPath-locator-in-a-Browser-Clickpath-Monitor/ta-p/214051" target="_blank" rel="noopener"&gt;How to add an XPath locator in a Browser Clickpath Monitor script&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;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.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN data-contrast="auto"&gt;What to read next:&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN data-ccp-props="{&amp;quot;134233117&amp;quot;:false,&amp;quot;134233118&amp;quot;:false,&amp;quot;335559738&amp;quot;:299,&amp;quot;335559739&amp;quot;:299}"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="HannahM_0-1764928643224.png" style="width: 23px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/31110i3CA3D5108712E6C4/image-dimensions/23x23?v=v2" width="23" height="23" role="button" title="HannahM_0-1764928643224.png" alt="HannahM_0-1764928643224.png" /&gt;&lt;/span&gt;&lt;A id="link_6" class="page-link lia-link-navigation lia-custom-event" style="font-family: inherit; background-color: #ffffff;" href="https://community.dynatrace.com/t5/Troubleshooting/Synthetic-Troubleshooting-Map/ta-p/250426" target="_blank" rel="noopener"&gt;Synthetic Troubleshooting Map&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-ccp-props="{&amp;quot;134233117&amp;quot;:false,&amp;quot;134233118&amp;quot;:false,&amp;quot;335559738&amp;quot;:240,&amp;quot;335559739&amp;quot;:240}"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HannahM_0-1764928643224.png" style="width: 23px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/31110i3CA3D5108712E6C4/image-dimensions/23x23?v=v2" width="23" height="23" role="button" title="HannahM_0-1764928643224.png" alt="HannahM_0-1764928643224.png" /&gt;&lt;/span&gt;&lt;A style="background-color: #ffffff;" href="https://community.dynatrace.com/t5/Troubleshooting/How-to-perform-a-click-event-using-Javascript-on-browser/ta-p/244503" target="_self"&gt;&amp;nbsp;&amp;nbsp;How to perform a click event using Javascript on browser clickpath synthetic monitors&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-ccp-props="{&amp;quot;134233117&amp;quot;:false,&amp;quot;134233118&amp;quot;:false,&amp;quot;335559738&amp;quot;:240,&amp;quot;335559739&amp;quot;:240}"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HannahM_0-1764928643224.png" style="width: 23px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/31110i3CA3D5108712E6C4/image-dimensions/23x23?v=v2" width="23" height="23" role="button" title="HannahM_0-1764928643224.png" alt="HannahM_0-1764928643224.png" /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;A style="background-color: #ffffff;" title="How to add an XPath locator in a Browser Clickpath Monitor script" href="https://community.dynatrace.com/t5/Troubleshooting/How-to-add-an-XPath-locator-in-a-Browser-Clickpath-Monitor/ta-p/214051" target="_blank" rel="noopener"&gt;How to add an XPath locator in a Browser Clickpath Monitor script&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-ccp-props="{&amp;quot;134233117&amp;quot;:false,&amp;quot;134233118&amp;quot;:false,&amp;quot;335559738&amp;quot;:240,&amp;quot;335559739&amp;quot;:240}"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HannahM_0-1764928643224.png" style="width: 23px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/31110i3CA3D5108712E6C4/image-dimensions/23x23?v=v2" width="23" height="23" role="button" title="HannahM_0-1764928643224.png" alt="HannahM_0-1764928643224.png" /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;A style="background-color: #ffffff;" title="How to add the DOM selector on Browser click path monitors with the Dynamic iframes scenarios" href="https://community.dynatrace.com/t5/Troubleshooting/How-to-add-the-DOM-selector-on-Browser-click-path-monitors-with/ta-p/209499" target="_blank" rel="noopener"&gt;How to add the DOM selector on Browser click path monitors with the Dynamic iframes scenarios&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-ccp-props="{&amp;quot;134233117&amp;quot;:false,&amp;quot;134233118&amp;quot;:false,&amp;quot;335559738&amp;quot;:240,&amp;quot;335559739&amp;quot;:240}"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HannahM_0-1764928643224.png" style="width: 23px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/31110i3CA3D5108712E6C4/image-dimensions/23x23?v=v2" width="23" height="23" role="button" title="HannahM_0-1764928643224.png" alt="HannahM_0-1764928643224.png" /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;A style="background-color: #ffffff;" title="Synthetic Browser Monitor Error Codes" href="https://community.dynatrace.com/t5/Troubleshooting/Synthetic-Browser-Monitor-Error-Codes/ta-p/198177" target="_blank" rel="noopener"&gt;Synthetic Browser Monitor Error Codes&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Dec 2025 10:03:24 GMT</pubDate>
    <dc:creator>Mareeswaran</dc:creator>
    <dc:date>2025-12-05T10:03:24Z</dc:date>
    <item>
      <title>How to inspect and add shadow DOM elements into Browser clickpath script events.</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/How-to-inspect-and-add-shadow-DOM-elements-into-Browser/ta-p/209228</link>
      <description>&lt;P&gt;&lt;EM&gt;Summary: The Dynatrace Synthetic Recorder extension doesn't support recording shadow DOM elements.&amp;nbsp;To accommodate this, the locator must be updated in the Browser clickpath.&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;LI-TOC indent="15" liststyle="disc" maxheadinglevel="2"&gt;&lt;/LI-TOC&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2 id="toc-hId--705370114"&gt;Problem&lt;/H2&gt;
&lt;P&gt;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.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2 id="toc-hId-1032019071"&gt;Resolution&lt;/H2&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;Go to the relevant page on a Chrome browser&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;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&lt;/P&gt;
&lt;DIV id="tinyMceEditorMareeswaran_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="tinyMceEditorMareeswaran_3" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image1.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/10974iE86C649F3BB3BDA2/image-size/large?v=v2&amp;amp;px=999" role="button" title="image1.png" alt="image1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Right-click on the element on the Web developer tools - &amp;gt; Copy - &amp;gt; Copy JS path&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Add this copied DOM selector into your synthetic script events as a type of DOM selector.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV id="tinyMceEditorMareeswaran_2" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image3.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/10976i3132FA29910F7A04/image-size/large?v=v2&amp;amp;px=999" role="button" title="image3.png" alt="image3.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2 id="toc-hId--1520137890"&gt;What's Next&lt;/H2&gt;
&lt;P&gt;If this doesn't work, it may be that you need to try a different locator or to fire some events, see&amp;nbsp;&lt;A id="link_7" class="page-link lia-link-navigation lia-custom-event" href="https://community.dynatrace.com/t5/Troubleshooting/How-to-perform-click-event-with-help-of-Javascript-on-browser/ta-p/244503" target="_blank" rel="noopener"&gt;How to perform click event with help of Javascript on browser click path synthetic monitor incase of...,&lt;/A&gt;&amp;nbsp;or try using an XHR locator instead,&amp;nbsp;&lt;A style="background-color: #ffffff;" title="How to add an XPath locator in a Browser Clickpath Monitor script" href="https://community.dynatrace.com/t5/Troubleshooting/How-to-add-an-XPath-locator-in-a-Browser-Clickpath-Monitor/ta-p/214051" target="_blank" rel="noopener"&gt;How to add an XPath locator in a Browser Clickpath Monitor script&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;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.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN data-contrast="auto"&gt;What to read next:&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN data-ccp-props="{&amp;quot;134233117&amp;quot;:false,&amp;quot;134233118&amp;quot;:false,&amp;quot;335559738&amp;quot;:299,&amp;quot;335559739&amp;quot;:299}"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="HannahM_0-1764928643224.png" style="width: 23px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/31110i3CA3D5108712E6C4/image-dimensions/23x23?v=v2" width="23" height="23" role="button" title="HannahM_0-1764928643224.png" alt="HannahM_0-1764928643224.png" /&gt;&lt;/span&gt;&lt;A id="link_6" class="page-link lia-link-navigation lia-custom-event" style="font-family: inherit; background-color: #ffffff;" href="https://community.dynatrace.com/t5/Troubleshooting/Synthetic-Troubleshooting-Map/ta-p/250426" target="_blank" rel="noopener"&gt;Synthetic Troubleshooting Map&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-ccp-props="{&amp;quot;134233117&amp;quot;:false,&amp;quot;134233118&amp;quot;:false,&amp;quot;335559738&amp;quot;:240,&amp;quot;335559739&amp;quot;:240}"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HannahM_0-1764928643224.png" style="width: 23px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/31110i3CA3D5108712E6C4/image-dimensions/23x23?v=v2" width="23" height="23" role="button" title="HannahM_0-1764928643224.png" alt="HannahM_0-1764928643224.png" /&gt;&lt;/span&gt;&lt;A style="background-color: #ffffff;" href="https://community.dynatrace.com/t5/Troubleshooting/How-to-perform-a-click-event-using-Javascript-on-browser/ta-p/244503" target="_self"&gt;&amp;nbsp;&amp;nbsp;How to perform a click event using Javascript on browser clickpath synthetic monitors&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-ccp-props="{&amp;quot;134233117&amp;quot;:false,&amp;quot;134233118&amp;quot;:false,&amp;quot;335559738&amp;quot;:240,&amp;quot;335559739&amp;quot;:240}"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HannahM_0-1764928643224.png" style="width: 23px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/31110i3CA3D5108712E6C4/image-dimensions/23x23?v=v2" width="23" height="23" role="button" title="HannahM_0-1764928643224.png" alt="HannahM_0-1764928643224.png" /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;A style="background-color: #ffffff;" title="How to add an XPath locator in a Browser Clickpath Monitor script" href="https://community.dynatrace.com/t5/Troubleshooting/How-to-add-an-XPath-locator-in-a-Browser-Clickpath-Monitor/ta-p/214051" target="_blank" rel="noopener"&gt;How to add an XPath locator in a Browser Clickpath Monitor script&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-ccp-props="{&amp;quot;134233117&amp;quot;:false,&amp;quot;134233118&amp;quot;:false,&amp;quot;335559738&amp;quot;:240,&amp;quot;335559739&amp;quot;:240}"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HannahM_0-1764928643224.png" style="width: 23px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/31110i3CA3D5108712E6C4/image-dimensions/23x23?v=v2" width="23" height="23" role="button" title="HannahM_0-1764928643224.png" alt="HannahM_0-1764928643224.png" /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;A style="background-color: #ffffff;" title="How to add the DOM selector on Browser click path monitors with the Dynamic iframes scenarios" href="https://community.dynatrace.com/t5/Troubleshooting/How-to-add-the-DOM-selector-on-Browser-click-path-monitors-with/ta-p/209499" target="_blank" rel="noopener"&gt;How to add the DOM selector on Browser click path monitors with the Dynamic iframes scenarios&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-ccp-props="{&amp;quot;134233117&amp;quot;:false,&amp;quot;134233118&amp;quot;:false,&amp;quot;335559738&amp;quot;:240,&amp;quot;335559739&amp;quot;:240}"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HannahM_0-1764928643224.png" style="width: 23px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/31110i3CA3D5108712E6C4/image-dimensions/23x23?v=v2" width="23" height="23" role="button" title="HannahM_0-1764928643224.png" alt="HannahM_0-1764928643224.png" /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;A style="background-color: #ffffff;" title="Synthetic Browser Monitor Error Codes" href="https://community.dynatrace.com/t5/Troubleshooting/Synthetic-Browser-Monitor-Error-Codes/ta-p/198177" target="_blank" rel="noopener"&gt;Synthetic Browser Monitor Error Codes&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Dec 2025 10:03:24 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/How-to-inspect-and-add-shadow-DOM-elements-into-Browser/ta-p/209228</guid>
      <dc:creator>Mareeswaran</dc:creator>
      <dc:date>2025-12-05T10:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to inspect and add the shadow DOM elements into synthetic script events.</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/How-to-inspect-and-add-shadow-DOM-elements-into-Browser/tac-p/212109#M198</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/40562"&gt;@Mareeswaran&lt;/a&gt;&amp;nbsp;&amp;nbsp;Thank you for sharing this! I'm sure it will help out many community members.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 19:11:33 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/How-to-inspect-and-add-shadow-DOM-elements-into-Browser/tac-p/212109#M198</guid>
      <dc:creator>ChadTurner</dc:creator>
      <dc:date>2023-05-12T19:11:33Z</dc:date>
    </item>
  </channel>
</rss>

