<?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 perform a click event using Javascript on browser clickpath synthetic monitors in Troubleshooting</title>
    <link>https://community.dynatrace.com/t5/Troubleshooting/How-to-perform-a-click-event-using-Javascript-on-browser/ta-p/244503</link>
    <description>&lt;H2&gt;Summary&lt;/H2&gt;
&lt;DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;When a recorded click fails in a Dynatrace Synthetic Browser Monitor, you can use a &lt;STRONG&gt;JavaScript event&lt;/STRONG&gt; to manually dispatch the required pointer and mouse events (&lt;CODE&gt;pointerdown&lt;/CODE&gt;, &lt;CODE&gt;pointerup&lt;/CODE&gt;, &lt;CODE&gt;mouseup&lt;/CODE&gt;, &lt;CODE&gt;click&lt;/CODE&gt;) so the application processes the interaction correctly.&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;This approach is commonly required for modern web applications that rely on multiple event listeners or advanced front‑end frameworks.&lt;/DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;LI-TOC indent="15" liststyle="disc" maxheadinglevel="3"&gt;&lt;/LI-TOC&gt;&lt;/P&gt;
&lt;DIV class="lia-message-template-content-zone"&gt;
&lt;DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;H2&gt;&lt;SPAN&gt;Problem&lt;/SPAN&gt;&lt;/H2&gt;
&lt;DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;In some scenarios, a &lt;STRONG&gt;recorded click event&lt;/STRONG&gt; in a Browser Clickpath Synthetic Monitor &lt;STRONG&gt;does not work during execution or playback&lt;/STRONG&gt;.&lt;/DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;This usually happens because the target application &lt;STRONG&gt;doesn't respond to a simple &lt;CODE&gt;.click()&lt;/CODE&gt; action&lt;/STRONG&gt;, but instead expects a &lt;STRONG&gt;combination of pointer and mouse events&lt;/STRONG&gt; to be fired in a specific order.&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;H2&gt;When JavaScript Click Events Are Required&lt;/H2&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;You typically need a JavaScript click event when:&lt;/DIV&gt;
&lt;UL&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;The recorded click works during recording but &lt;STRONG&gt;fails during monitor execution&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;The application relies on &lt;STRONG&gt;custom JavaScript event listeners&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;The element reacts to &lt;STRONG&gt;pointer events&lt;/STRONG&gt;, not just click events&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;The application uses &lt;STRONG&gt;modern UI frameworks&lt;/STRONG&gt; or &lt;STRONG&gt;Shadow DOM&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;In these cases, dispatching the required events manually ensures the application behaves as if a real user performed the action.&lt;/DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV&gt;
&lt;H2&gt;How to Identify Required Events (Chrome DevTools)&lt;/H2&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;Before writing any JavaScript, verify which events the application expects.&lt;/DIV&gt;
&lt;H3&gt;Step 1 – Inspect the element&lt;/H3&gt;
&lt;/DIV&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;DIV&gt;Open the application in &lt;STRONG&gt;Google Chrome&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV&gt;Right‑click the element you want to interact with&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV&gt;&amp;nbsp;Select &lt;STRONG&gt;Inspect&lt;/STRONG&gt; to open Chrome DevTools, which will open the developer tools&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Inspect.jpg" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/19580i323BF3A358BE80E9/image-size/large?v=v2&amp;amp;px=999" role="button" title="Inspect.jpg" alt="Inspect.jpg" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;DIV&gt;
&lt;H3&gt;Step 2 – Check event listeners&lt;/H3&gt;
&lt;OL&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;In DevTools, select the element&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Open the &lt;STRONG&gt;Event Listeners&lt;/STRONG&gt; tab&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Identify which events are registered (for example: &lt;CODE&gt;click&lt;/CODE&gt;, &lt;CODE&gt;pointerdown&lt;/CODE&gt;, &lt;CODE&gt;pointerup&lt;/CODE&gt;, &lt;CODE&gt;mouseover&lt;/CODE&gt;)&lt;BR /&gt;
&lt;DIV&gt;These are the events you’ll need to dispatch manually.&lt;/DIV&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;/DIV&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Event Listeners.jpg" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/19581i0C3AA0BF9695E7F2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Event Listeners.jpg" alt="Event Listeners.jpg" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;DIV&gt;
&lt;H2&gt;JavaScript Example: Triggering Pointer and Mouse Events&lt;/H2&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;The following example demonstrates how to dispatch multiple events to reliably simulate a real user click.&lt;/DIV&gt;
&lt;H3&gt;Step 3 – Copy the JavaScript selector&lt;/H3&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;In Chrome DevTools:&lt;/DIV&gt;
&lt;UL&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Right‑click the element in the DOM tree&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Select &lt;STRONG&gt;Copy → Copy JS path&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;DIV class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Copy JS Path.jpg" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/19584i1D38DFBF2682040A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Copy JS Path.jpg" alt="Copy JS Path.jpg" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;H3&gt;Step 4 – Add a JavaScript Event to the Browser Clickpath&lt;/H3&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;Paste the following code into a &lt;STRONG&gt;JavaScript event&lt;/STRONG&gt; in your Browser Clickpath Synthetic Monitor, and replace the selector with your own.&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Add JS event.jpg" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/19583i51245B71ED533363/image-size/large?v=v2&amp;amp;px=999" role="button" title="Add JS event.jpg" alt="Add JS event.jpg" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;function triggerevent(element)
{

 var parameters1 = {    isTrusted: true,    pressure: 0.5,    type: "pointerdown",    bubbles: true,    cancelable: true,    cancelBubble: false  };
 var parameters2 = {    isTrusted: true,    bubbles: true,    cancelable: true,    cancelBubble: false  };
 
 var evt1 = new PointerEvent("pointerdown", parameters1);
 element.dispatchEvent(evt1);
 var evt2 = new PointerEvent("pointerup", parameters1);
 element.dispatchEvent(evt2);
 var evt3 = new MouseEvent("mouseup", parameters2);
 element.dispatchEvent(evt3);
 var evt4 = new MouseEvent("click", parameters2);
 element.dispatchEvent(evt4);
 
}

var element = document.querySelector("#layout-inner &amp;gt; dt-common-navigation").shadowRoot.querySelector("nav &amp;gt; nav &amp;gt; ul &amp;gt; li:nth-child(9) &amp;gt; a");
triggerevent(element);&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;H2&gt;Example Using Shadow DOM&lt;/H2&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;&lt;span class="lia-unicode-emoji" title=":warning:"&gt;⚠️&lt;/span&gt; &lt;STRONG&gt;Note:&lt;/STRONG&gt;&lt;BR /&gt;The example above accesses the element via &lt;CODE&gt;shadowRoot&lt;/CODE&gt;. This is required &lt;STRONG&gt;only if your application uses Shadow DOM&lt;/STRONG&gt;.&lt;/DIV&gt;
&lt;UL&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;If your application &lt;STRONG&gt;doesn't use Shadow DOM&lt;/STRONG&gt;, remove the &lt;CODE&gt;.shadowRoot&lt;/CODE&gt; portion and use a standard &lt;CODE&gt;querySelector()&lt;/CODE&gt; instead.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;H2&gt;Common Pitfalls and Troubleshooting&lt;/H2&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;If the click still does not work:&lt;/DIV&gt;
&lt;UL&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Verify that the &lt;STRONG&gt;correct element&lt;/STRONG&gt; is being selected&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Confirm the &lt;STRONG&gt;required event types&lt;/STRONG&gt; in DevTools&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Ensure the element is &lt;STRONG&gt;visible and not covered by overlays&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Check whether the application requires &lt;STRONG&gt;trusted events&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;H2&gt;When to Use Trusted Events Instead&lt;/H2&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;Some applications check whether an action was triggered by a &lt;STRONG&gt;real user&lt;/STRONG&gt; using the &lt;CODE&gt;isTrusted&lt;/CODE&gt; property.&lt;/DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;In these cases, JavaScript‑dispatched events may still fail. If this happens, consider enabling &lt;STRONG&gt;Trusted Events&lt;/STRONG&gt; in your Browser Clickpath configuration and using native click steps instead.&lt;/DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;See&amp;nbsp;&lt;A id="link_6" class="page-link lia-link-navigation lia-custom-event" href="https://community.dynatrace.com/t5/Troubleshooting/How-to-interact-with-trusted-events-in-a-Browser-Clickpath/ta-p/222074" target="_blank"&gt;How to interact with trusted events in a Browser Clickpath Monitor&lt;/A&gt; for details.&lt;/DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;
&lt;DIV&gt;
&lt;H2&gt;Frequently Asked Questions&lt;/H2&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;&lt;STRONG&gt;Why doesn’t &lt;CODE&gt;.click()&lt;/CODE&gt; work in Synthetic Browser Monitors?&lt;/STRONG&gt;&lt;BR /&gt;Some applications listen for multiple pointer or mouse events, not just a click.&lt;/DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;&lt;STRONG&gt;When should I use JavaScript events instead of recorded clicks?&lt;/STRONG&gt;&lt;BR /&gt;When recorded clicks fail during execution but work during recording.&lt;/DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;&lt;STRONG&gt;Is this approach supported by Dynatrace?&lt;/STRONG&gt;&lt;BR /&gt;Yes. Browser Clickpath Synthetic Monitors support JavaScript events for advanced interaction scenarios.&lt;/DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;&lt;STRONG&gt;Should I always prefer Trusted Events?&lt;/STRONG&gt;&lt;BR /&gt;Use Trusted Events when the application explicitly checks for real user interactions; otherwise, JavaScript events are often sufficient.&lt;/DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;H2 id="toc-hId--526228148"&gt;What's Next&lt;/H2&gt;
&lt;DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;If the issue persists after trying JavaScript and trusted events, open a &lt;STRONG&gt;support chat or ticket&lt;/STRONG&gt; and provide:&lt;/DIV&gt;
&lt;UL&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;A link to the affected monitor&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;The selector and JavaScript used&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;A reference to this article&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;STRONG&gt;&lt;SPAN data-contrast="auto"&gt;Related reading&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;/H3&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;A id="link_6" class="page-link lia-link-navigation lia-custom-event" href="https://community.dynatrace.com/t5/Troubleshooting/Synthetic-Troubleshooting-Map/ta-p/250426" target="_blank" rel="noopener"&gt;&lt;span class="lia-unicode-emoji" title=":open_book:"&gt;📖&lt;/span&gt;&amp;nbsp; Synthetic Troubleshooting Map&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-unicode-emoji" title=":open_book:"&gt;📖&lt;/span&gt;&amp;nbsp; &lt;A id="link_6" class="page-link lia-link-navigation lia-custom-event" href="https://community.dynatrace.com/t5/Troubleshooting/How-to-interact-with-trusted-events-in-a-Browser-Clickpath/ta-p/222074" target="_blank"&gt;How to interact with trusted events in a Browser Clickpath Monitor&lt;/A&gt;&amp;nbsp;&amp;nbsp;&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-unicode-emoji" title=":open_book:"&gt;📖&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;A style="background-color: #ffffff;" title="How to add conditional JavaScript code to close the intermittent popup on Browser click path monitor." href="https://community.dynatrace.com/t5/Troubleshooting/How-to-add-conditional-JavaScript-code-to-close-the-intermittent/ta-p/209319" target="_blank"&gt;How to add conditional JavaScript code to close the intermittent popup on Browser click path monitor...&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-unicode-emoji" title=":open_book:"&gt;📖&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;A style="background-color: #ffffff;" title="How to perform a right-click in a Browser Clickpath Synthetic Monitor" href="https://community.dynatrace.com/t5/Troubleshooting/How-to-perform-a-right-click-in-a-Browser-Clickpath-Synthetic/ta-p/233062" target="_blank"&gt;How to perform a right-click in a Browser Clickpath Synthetic Monitor&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-unicode-emoji" title=":open_book:"&gt;📖&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="How to inspect and add the shadow DOM elements into synthetic script events." href="https://community.dynatrace.com/t5/Troubleshooting/How-to-inspect-and-add-the-shadow-DOM-elements-into-synthetic/ta-p/209228" target="_blank"&gt;How to inspect and add the shadow DOM elements into synthetic script events&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 08 Jun 2026 10:40:37 GMT</pubDate>
    <dc:creator>Mareeswaran</dc:creator>
    <dc:date>2026-06-08T10:40:37Z</dc:date>
    <item>
      <title>How to perform a click event using Javascript on browser clickpath synthetic monitors</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/How-to-perform-a-click-event-using-Javascript-on-browser/ta-p/244503</link>
      <description>&lt;H2&gt;Summary&lt;/H2&gt;
&lt;DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;When a recorded click fails in a Dynatrace Synthetic Browser Monitor, you can use a &lt;STRONG&gt;JavaScript event&lt;/STRONG&gt; to manually dispatch the required pointer and mouse events (&lt;CODE&gt;pointerdown&lt;/CODE&gt;, &lt;CODE&gt;pointerup&lt;/CODE&gt;, &lt;CODE&gt;mouseup&lt;/CODE&gt;, &lt;CODE&gt;click&lt;/CODE&gt;) so the application processes the interaction correctly.&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;This approach is commonly required for modern web applications that rely on multiple event listeners or advanced front‑end frameworks.&lt;/DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;LI-TOC indent="15" liststyle="disc" maxheadinglevel="3"&gt;&lt;/LI-TOC&gt;&lt;/P&gt;
&lt;DIV class="lia-message-template-content-zone"&gt;
&lt;DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;H2&gt;&lt;SPAN&gt;Problem&lt;/SPAN&gt;&lt;/H2&gt;
&lt;DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;In some scenarios, a &lt;STRONG&gt;recorded click event&lt;/STRONG&gt; in a Browser Clickpath Synthetic Monitor &lt;STRONG&gt;does not work during execution or playback&lt;/STRONG&gt;.&lt;/DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;This usually happens because the target application &lt;STRONG&gt;doesn't respond to a simple &lt;CODE&gt;.click()&lt;/CODE&gt; action&lt;/STRONG&gt;, but instead expects a &lt;STRONG&gt;combination of pointer and mouse events&lt;/STRONG&gt; to be fired in a specific order.&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;H2&gt;When JavaScript Click Events Are Required&lt;/H2&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;You typically need a JavaScript click event when:&lt;/DIV&gt;
&lt;UL&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;The recorded click works during recording but &lt;STRONG&gt;fails during monitor execution&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;The application relies on &lt;STRONG&gt;custom JavaScript event listeners&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;The element reacts to &lt;STRONG&gt;pointer events&lt;/STRONG&gt;, not just click events&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;The application uses &lt;STRONG&gt;modern UI frameworks&lt;/STRONG&gt; or &lt;STRONG&gt;Shadow DOM&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;In these cases, dispatching the required events manually ensures the application behaves as if a real user performed the action.&lt;/DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV&gt;
&lt;H2&gt;How to Identify Required Events (Chrome DevTools)&lt;/H2&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;Before writing any JavaScript, verify which events the application expects.&lt;/DIV&gt;
&lt;H3&gt;Step 1 – Inspect the element&lt;/H3&gt;
&lt;/DIV&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;DIV&gt;Open the application in &lt;STRONG&gt;Google Chrome&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV&gt;Right‑click the element you want to interact with&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV&gt;&amp;nbsp;Select &lt;STRONG&gt;Inspect&lt;/STRONG&gt; to open Chrome DevTools, which will open the developer tools&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Inspect.jpg" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/19580i323BF3A358BE80E9/image-size/large?v=v2&amp;amp;px=999" role="button" title="Inspect.jpg" alt="Inspect.jpg" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;DIV&gt;
&lt;H3&gt;Step 2 – Check event listeners&lt;/H3&gt;
&lt;OL&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;In DevTools, select the element&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Open the &lt;STRONG&gt;Event Listeners&lt;/STRONG&gt; tab&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Identify which events are registered (for example: &lt;CODE&gt;click&lt;/CODE&gt;, &lt;CODE&gt;pointerdown&lt;/CODE&gt;, &lt;CODE&gt;pointerup&lt;/CODE&gt;, &lt;CODE&gt;mouseover&lt;/CODE&gt;)&lt;BR /&gt;
&lt;DIV&gt;These are the events you’ll need to dispatch manually.&lt;/DIV&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;/DIV&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Event Listeners.jpg" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/19581i0C3AA0BF9695E7F2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Event Listeners.jpg" alt="Event Listeners.jpg" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;DIV&gt;
&lt;H2&gt;JavaScript Example: Triggering Pointer and Mouse Events&lt;/H2&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;The following example demonstrates how to dispatch multiple events to reliably simulate a real user click.&lt;/DIV&gt;
&lt;H3&gt;Step 3 – Copy the JavaScript selector&lt;/H3&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;In Chrome DevTools:&lt;/DIV&gt;
&lt;UL&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Right‑click the element in the DOM tree&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Select &lt;STRONG&gt;Copy → Copy JS path&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;DIV class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Copy JS Path.jpg" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/19584i1D38DFBF2682040A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Copy JS Path.jpg" alt="Copy JS Path.jpg" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;H3&gt;Step 4 – Add a JavaScript Event to the Browser Clickpath&lt;/H3&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;Paste the following code into a &lt;STRONG&gt;JavaScript event&lt;/STRONG&gt; in your Browser Clickpath Synthetic Monitor, and replace the selector with your own.&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Add JS event.jpg" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/19583i51245B71ED533363/image-size/large?v=v2&amp;amp;px=999" role="button" title="Add JS event.jpg" alt="Add JS event.jpg" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;function triggerevent(element)
{

 var parameters1 = {    isTrusted: true,    pressure: 0.5,    type: "pointerdown",    bubbles: true,    cancelable: true,    cancelBubble: false  };
 var parameters2 = {    isTrusted: true,    bubbles: true,    cancelable: true,    cancelBubble: false  };
 
 var evt1 = new PointerEvent("pointerdown", parameters1);
 element.dispatchEvent(evt1);
 var evt2 = new PointerEvent("pointerup", parameters1);
 element.dispatchEvent(evt2);
 var evt3 = new MouseEvent("mouseup", parameters2);
 element.dispatchEvent(evt3);
 var evt4 = new MouseEvent("click", parameters2);
 element.dispatchEvent(evt4);
 
}

var element = document.querySelector("#layout-inner &amp;gt; dt-common-navigation").shadowRoot.querySelector("nav &amp;gt; nav &amp;gt; ul &amp;gt; li:nth-child(9) &amp;gt; a");
triggerevent(element);&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;H2&gt;Example Using Shadow DOM&lt;/H2&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;&lt;span class="lia-unicode-emoji" title=":warning:"&gt;⚠️&lt;/span&gt; &lt;STRONG&gt;Note:&lt;/STRONG&gt;&lt;BR /&gt;The example above accesses the element via &lt;CODE&gt;shadowRoot&lt;/CODE&gt;. This is required &lt;STRONG&gt;only if your application uses Shadow DOM&lt;/STRONG&gt;.&lt;/DIV&gt;
&lt;UL&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;If your application &lt;STRONG&gt;doesn't use Shadow DOM&lt;/STRONG&gt;, remove the &lt;CODE&gt;.shadowRoot&lt;/CODE&gt; portion and use a standard &lt;CODE&gt;querySelector()&lt;/CODE&gt; instead.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;H2&gt;Common Pitfalls and Troubleshooting&lt;/H2&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;If the click still does not work:&lt;/DIV&gt;
&lt;UL&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Verify that the &lt;STRONG&gt;correct element&lt;/STRONG&gt; is being selected&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Confirm the &lt;STRONG&gt;required event types&lt;/STRONG&gt; in DevTools&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Ensure the element is &lt;STRONG&gt;visible and not covered by overlays&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Check whether the application requires &lt;STRONG&gt;trusted events&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;H2&gt;When to Use Trusted Events Instead&lt;/H2&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;Some applications check whether an action was triggered by a &lt;STRONG&gt;real user&lt;/STRONG&gt; using the &lt;CODE&gt;isTrusted&lt;/CODE&gt; property.&lt;/DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;In these cases, JavaScript‑dispatched events may still fail. If this happens, consider enabling &lt;STRONG&gt;Trusted Events&lt;/STRONG&gt; in your Browser Clickpath configuration and using native click steps instead.&lt;/DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;See&amp;nbsp;&lt;A id="link_6" class="page-link lia-link-navigation lia-custom-event" href="https://community.dynatrace.com/t5/Troubleshooting/How-to-interact-with-trusted-events-in-a-Browser-Clickpath/ta-p/222074" target="_blank"&gt;How to interact with trusted events in a Browser Clickpath Monitor&lt;/A&gt; for details.&lt;/DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;
&lt;DIV&gt;
&lt;H2&gt;Frequently Asked Questions&lt;/H2&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;&lt;STRONG&gt;Why doesn’t &lt;CODE&gt;.click()&lt;/CODE&gt; work in Synthetic Browser Monitors?&lt;/STRONG&gt;&lt;BR /&gt;Some applications listen for multiple pointer or mouse events, not just a click.&lt;/DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;&lt;STRONG&gt;When should I use JavaScript events instead of recorded clicks?&lt;/STRONG&gt;&lt;BR /&gt;When recorded clicks fail during execution but work during recording.&lt;/DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;&lt;STRONG&gt;Is this approach supported by Dynatrace?&lt;/STRONG&gt;&lt;BR /&gt;Yes. Browser Clickpath Synthetic Monitors support JavaScript events for advanced interaction scenarios.&lt;/DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;&lt;STRONG&gt;Should I always prefer Trusted Events?&lt;/STRONG&gt;&lt;BR /&gt;Use Trusted Events when the application explicitly checks for real user interactions; otherwise, JavaScript events are often sufficient.&lt;/DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;H2 id="toc-hId--526228148"&gt;What's Next&lt;/H2&gt;
&lt;DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;If the issue persists after trying JavaScript and trusted events, open a &lt;STRONG&gt;support chat or ticket&lt;/STRONG&gt; and provide:&lt;/DIV&gt;
&lt;UL&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;A link to the affected monitor&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;The selector and JavaScript used&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;A reference to this article&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;STRONG&gt;&lt;SPAN data-contrast="auto"&gt;Related reading&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;/H3&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;A id="link_6" class="page-link lia-link-navigation lia-custom-event" href="https://community.dynatrace.com/t5/Troubleshooting/Synthetic-Troubleshooting-Map/ta-p/250426" target="_blank" rel="noopener"&gt;&lt;span class="lia-unicode-emoji" title=":open_book:"&gt;📖&lt;/span&gt;&amp;nbsp; Synthetic Troubleshooting Map&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-unicode-emoji" title=":open_book:"&gt;📖&lt;/span&gt;&amp;nbsp; &lt;A id="link_6" class="page-link lia-link-navigation lia-custom-event" href="https://community.dynatrace.com/t5/Troubleshooting/How-to-interact-with-trusted-events-in-a-Browser-Clickpath/ta-p/222074" target="_blank"&gt;How to interact with trusted events in a Browser Clickpath Monitor&lt;/A&gt;&amp;nbsp;&amp;nbsp;&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-unicode-emoji" title=":open_book:"&gt;📖&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;A style="background-color: #ffffff;" title="How to add conditional JavaScript code to close the intermittent popup on Browser click path monitor." href="https://community.dynatrace.com/t5/Troubleshooting/How-to-add-conditional-JavaScript-code-to-close-the-intermittent/ta-p/209319" target="_blank"&gt;How to add conditional JavaScript code to close the intermittent popup on Browser click path monitor...&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-unicode-emoji" title=":open_book:"&gt;📖&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;A style="background-color: #ffffff;" title="How to perform a right-click in a Browser Clickpath Synthetic Monitor" href="https://community.dynatrace.com/t5/Troubleshooting/How-to-perform-a-right-click-in-a-Browser-Clickpath-Synthetic/ta-p/233062" target="_blank"&gt;How to perform a right-click in a Browser Clickpath Synthetic Monitor&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-unicode-emoji" title=":open_book:"&gt;📖&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;A title="How to inspect and add the shadow DOM elements into synthetic script events." href="https://community.dynatrace.com/t5/Troubleshooting/How-to-inspect-and-add-the-shadow-DOM-elements-into-synthetic/ta-p/209228" target="_blank"&gt;How to inspect and add the shadow DOM elements into synthetic script events&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2026 10:40:37 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/How-to-perform-a-click-event-using-Javascript-on-browser/ta-p/244503</guid>
      <dc:creator>Mareeswaran</dc:creator>
      <dc:date>2026-06-08T10:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform click event with help of Javascript on browser click path synthetic monitor incase of recorded click event not</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/How-to-perform-a-click-event-using-Javascript-on-browser/tac-p/244731#M661</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/40562"&gt;@Mareeswaran&lt;/a&gt;&amp;nbsp;, thank you for your suggestion. I have tried replacing all the CSS locators with DOM and it works during replay but is there anyway we could set up Dynatrace to capture the DOM locators by default (instead of CSS) while recording a flow?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2024 07:05:16 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/How-to-perform-a-click-event-using-Javascript-on-browser/tac-p/244731#M661</guid>
      <dc:creator>shalnw</dc:creator>
      <dc:date>2024-05-03T07:05:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform click event with help of Javascript on browser click path synthetic monitor incase of recorded click event not</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/How-to-perform-a-click-event-using-Javascript-on-browser/tac-p/245038#M665</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/75349"&gt;@shalnw&lt;/a&gt;&amp;nbsp; Unfortunately, we don't have way to make the synthetic recorder&amp;nbsp;&lt;SPAN&gt;to capture the DOM locators by default and we need to inspect &amp;amp; add the DOM locators manually.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 05:05:00 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/How-to-perform-a-click-event-using-Javascript-on-browser/tac-p/245038#M665</guid>
      <dc:creator>Mareeswaran</dc:creator>
      <dc:date>2024-05-08T05:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform click event with help of Javascript on browser click path synthetic monitor incase of recorded click event not</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/How-to-perform-a-click-event-using-Javascript-on-browser/tac-p/245039#M666</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/40562"&gt;@Mareeswaran&lt;/a&gt;&amp;nbsp;, I have added the DOM locators/ events and the screenshots to my recording. The playback click path replays the expected flow and the screenshots are correct. But when I go to Analyse executions to view results, it shows just the website's homepage. Is this inconsistency expected for Shadow DOM events?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 05:25:13 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/How-to-perform-a-click-event-using-Javascript-on-browser/tac-p/245039#M666</guid>
      <dc:creator>shalnw</dc:creator>
      <dc:date>2024-05-08T05:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform click event with help of Javascript on browser click path synthetic monitor incase of recorded click event not</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/How-to-perform-a-click-event-using-Javascript-on-browser/tac-p/245040#M667</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/75349"&gt;@shalnw&lt;/a&gt;&amp;nbsp; Yes.&amp;nbsp;&lt;SPAN&gt;If the application uses the shadowDOM elements, Dynatrace Synthetic Recorder extension not supported for recording the shadowDOM elements.&amp;nbsp; You can refer the community article for that&amp;nbsp;&lt;A class="" href="https://community.dynatrace.com/t5/Troubleshooting/How-to-inspect-and-add-the-shadow-DOM-elements-into-synthetic/ta-p/209228" target="_blank" rel="noopener"&gt;How to inspect and add the shadow DOM elements into synthetic script events.&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 05:14:47 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/How-to-perform-a-click-event-using-Javascript-on-browser/tac-p/245040#M667</guid>
      <dc:creator>Mareeswaran</dc:creator>
      <dc:date>2024-05-08T05:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform a click event using Javascript on browser clickpath synthetic monitors</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/How-to-perform-a-click-event-using-Javascript-on-browser/tac-p/289070#M1016</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;I tried out this JS script method and currently encountering the error "&lt;SPAN&gt;Playback error: Exception was thrown by the JavaScript code: Cannot read properties of null (reading 'shadowRoot')."&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kenyu216_0-1762283745911.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/30814i1A9D64DD7147B0DD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kenyu216_0-1762283745911.png" alt="kenyu216_0-1762283745911.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I'm not sure what I am missing here.&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Nov 2025 19:16:23 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/How-to-perform-a-click-event-using-Javascript-on-browser/tac-p/289070#M1016</guid>
      <dc:creator>kenyu216</dc:creator>
      <dc:date>2025-11-04T19:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform a click event using Javascript on browser clickpath synthetic monitors</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/How-to-perform-a-click-event-using-Javascript-on-browser/tac-p/289811#M1021</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/49354"&gt;@kenyu216&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suspect that target window may be different one and that is the reason its unable to identify the selector. You can inspect the element and check if there is any iframe are available. If so, you need to use the relevant target window like&amp;nbsp;ruxitWin[0].frames[0]&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Mareeswaran_0-1763541795116.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/30932iB8D7CCAD6EDEA75D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Mareeswaran_0-1763541795116.png" alt="Mareeswaran_0-1763541795116.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Nov 2025 08:43:09 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/How-to-perform-a-click-event-using-Javascript-on-browser/tac-p/289811#M1021</guid>
      <dc:creator>Mareeswaran</dc:creator>
      <dc:date>2025-11-19T08:43:09Z</dc:date>
    </item>
  </channel>
</rss>

