<?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 right-click in a Browser Clickpath Synthetic Monitor in Troubleshooting</title>
    <link>https://community.dynatrace.com/t5/Troubleshooting/How-to-perform-a-right-click-in-a-Browser-Clickpath-Synthetic/ta-p/233062</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 creating Dynatrace Browser Clickpath Synthetic monitors, a standard left‑click isn’t always sufficient. Some web applications rely on context‑menu interactions that require a right‑click action.&lt;/DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;This article explains how to perform a &lt;STRONG&gt;right‑click in a Browser Clickpath Synthetic monitor&lt;/STRONG&gt; by using a &lt;A href="https://docs.dynatrace.com/docs/platform-modules/digital-experience/synthetic-monitoring/browser-monitors/browser-clickpath-events#javascript" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;JavaScript event&lt;/STRONG&gt;&lt;/A&gt;, allowing you to reliably simulate advanced user interactions during Synthetic executions&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;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;How to Perform a Right‑Click Using a JavaScript Event&lt;/H2&gt;
&lt;H3&gt;Step 1 – Identify the Element to Right‑Click&lt;/H3&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;Go to the relevant page in a Chrome browser.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Right-click on the element you want to interact with on the page and select 'Inspect'. The element will then be shown in Developer Tools.&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Inspect.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/16545iC2DDB5737FAD885C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Inspect.png" alt="Inspect.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;DIV id="tinyMceEditorMareeswaran_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;H3&gt;Step 2 – Copy the JavaScript Selector&lt;/H3&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;Right-click on the element in the Web Developer Tools -&amp;gt; Copy -&amp;gt; Copy JS path.&lt;/P&gt;
&lt;DIV id="tinyMceEditorMareeswaran_1" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DevTools.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/16546i9D7461033307901B/image-size/large?v=v2&amp;amp;px=999" role="button" title="DevTools.png" alt="DevTools.png" /&gt;&lt;/span&gt;&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;H3&gt;Step 3 – Update the JavaScript snippet&lt;/H3&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;Paste the JavaScript selector in the value below the element.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;function rightClick(element){
  var evt = element.ownerDocument.createEvent('MouseEvents');
  var RIGHT_CLICK_BUTTON_CODE = 2; // the same for FF and IE
  evt.initMouseEvent('click', true, true,
      element.ownerDocument.defaultView, 1, 0, 0, 0, 0, false,
      false, false, false, RIGHT_CLICK_BUTTON_CODE, null);
  return !element.dispatchEvent(evt);
}
var element = document.querySelector('button[id="testid"]'); //Replace with the element which you want to right-click.
rightClick(element);&lt;/LI-CODE&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;H3&gt;&amp;nbsp;&lt;/H3&gt;
&lt;H3&gt;Step 4 – Add a JavaScript Event to the Browser Clickpath&lt;/H3&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;&lt;A href="https://docs.dynatrace.com/docs/platform-modules/digital-experience/synthetic-monitoring/browser-monitors/configure-browser-monitors#recorded-clickpath" target="_self"&gt;Add a new event&lt;/A&gt; to the monitor, where you need to right-click and paste in the updated snippet above.&amp;nbsp;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HannahM_3-1703869880685.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/16547i128E5D9B983A6DC2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HannahM_3-1703869880685.png" alt="HannahM_3-1703869880685.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;DIV&gt;
&lt;H2&gt;Frequently Asked Questions&lt;/H2&gt;
&lt;H3&gt;Why doesn’t right‑click work in recorded Browser Clickpaths?&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;The Dynatrace Synthetic Recorder doesn’t always capture context‑menu interactions. Recorded click actions are simple left-click, so right‑click actions will fail during playback and must be replaced with JavaScript events.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;H3&gt;Is this supported in Dynatrace Synthetic Monitoring?&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;Yes. Dynatrace Browser Clickpath Synthetic monitors support JavaScript events, which can be used to trigger advanced interactions such as right‑click actions when required.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;H3&gt;When should I use JavaScript events in Browser Clickpaths?&lt;/H3&gt;
&lt;P&gt;&lt;SPAN&gt;JavaScript events should be used when standard click or keystroke actions are unreliable, especially for dynamic UI elements, custom context menus, or JavaScript‑heavy applications.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;H2 id="toc-hId-1971787789"&gt;What's Next&lt;/H2&gt;
&lt;P&gt;If the previous steps don't resolve the issue, open a chat and provide a link to the monitor, along with the troubleshooting steps you have already completed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;Related reading&lt;/H3&gt;
&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":open_book:"&gt;📖&lt;/span&gt;&amp;nbsp; &lt;A class="" 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 class="lia-unicode-emoji" title=":open_book:"&gt;📖&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;A href="https://community.dynatrace.com/t5/Troubleshooting/How-to-perform-a-click-event-using-Javascript-on-browser/ta-p/244503" target="_self"&gt;How to perform a click event using JavaScript on Browser Clickpath Synthetic monitors&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":open_book:"&gt;📖&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;A href="https://community.dynatrace.com/t5/Troubleshooting/How-to-add-an-XPath-locator-in-a-Browser-Clickpath-Monitor/ta-p/214051" target="_self"&gt;How to add an XPath locator in a Browser Clickpath Monitor script&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":open_book:"&gt;📖&lt;/span&gt;&amp;nbsp; &lt;A href="https://docs.dynatrace.com/docs/observe/digital-experience/synthetic-monitoring/browser-monitors/browser-clickpath-events#javascript" target="_self"&gt;Browser clickpath JavaScript events&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 14 May 2026 13:27:10 GMT</pubDate>
    <dc:creator>HannahM</dc:creator>
    <dc:date>2026-05-14T13:27:10Z</dc:date>
    <item>
      <title>How to perform a right-click in a Browser Clickpath Synthetic Monitor</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/How-to-perform-a-right-click-in-a-Browser-Clickpath-Synthetic/ta-p/233062</link>
      <description>&lt;P&gt;&lt;LI-TOC indent="15" liststyle="disc" maxheadinglevel="2"&gt;&lt;/LI-TOC&gt;&lt;/P&gt;
&lt;DIV class="lia-message-template-content-zone"&gt;
&lt;P&gt;*&lt;EM&gt;Use a table of contents for longer articles.&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;H1&gt;Summary&lt;/H1&gt;
&lt;P&gt;&lt;EM&gt;*This is a mandatory section.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Short description of which part of the Dynatrace platform the article refers to and what kind of problem it will help resolve / task it will describe.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1&gt;Problem&lt;/H1&gt;
&lt;P&gt;&lt;EM&gt;*This is a mandatory section.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Provide a precise description of the problem / task to be described.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1&gt;Troubleshooting steps&lt;/H1&gt;
&lt;P&gt;&lt;EM&gt;*This section can be omitted.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1&gt;Resolution&lt;/H1&gt;
&lt;P&gt;&lt;EM&gt;*This section can be omitted for ticket‑creation articles.&lt;/EM&gt;&lt;/P&gt;
&lt;H1&gt;What's next&lt;/H1&gt;
&lt;P&gt;&lt;EM&gt;*This is a mandatory section.&lt;/EM&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 14 May 2026 13:27:10 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/How-to-perform-a-right-click-in-a-Browser-Clickpath-Synthetic/ta-p/233062</guid>
      <dc:creator>HannahM</dc:creator>
      <dc:date>2026-05-14T13:27:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform a right-click in a Browser Clickpath Synthetic Monitor</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/How-to-perform-a-right-click-in-a-Browser-Clickpath-Synthetic/tac-p/233248#M512</link>
      <description>&lt;P&gt;Thanks for sharing!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2024 12:44:02 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/How-to-perform-a-right-click-in-a-Browser-Clickpath-Synthetic/tac-p/233248#M512</guid>
      <dc:creator>ChadTurner</dc:creator>
      <dc:date>2024-01-03T12:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform a right-click in a Browser Clickpath Synthetic Monitor</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/How-to-perform-a-right-click-in-a-Browser-Clickpath-Synthetic/tac-p/249593#M690</link>
      <description>&lt;P&gt;Hello ,&lt;/P&gt;&lt;P&gt;I have tried to implement that but I am getting the below error once i have playback the record.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Playback error: Exception was thrown by the JavaScript code: Cannot read properties of null (reading 'ownerDocument')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is there any recomendation to overcome this issue?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2024 20:18:55 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/How-to-perform-a-right-click-in-a-Browser-Clickpath-Synthetic/tac-p/249593#M690</guid>
      <dc:creator>mwater07</dc:creator>
      <dc:date>2024-07-01T20:18:55Z</dc:date>
    </item>
  </channel>
</rss>

