<?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 Location dropdown(auto complete Address) with help of JavaScript Event on browser click path synthetic monitor. in Troubleshooting</title>
    <link>https://community.dynatrace.com/t5/Troubleshooting/How-to-perform-Location-dropdown-auto-complete-Address-with-help/ta-p/209241</link>
    <description>&lt;H2&gt;Summary&lt;/H2&gt;
&lt;DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;If your web application uses autocomplete, for example, a&amp;nbsp;&lt;STRONG&gt;location autocomplete&lt;/STRONG&gt; field, like an address search box backed by Google Maps or similar), the standard synthetic recording may not reliably capture the interaction.&lt;/DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;In these cases, you can use &lt;STRONG&gt;JavaScript events&lt;/STRONG&gt; inside a &lt;STRONG&gt;browser clickpath monitor&lt;/STRONG&gt; to:&lt;/DIV&gt;
&lt;OL&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Type a value into the location search field.&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Trigger the autocomplete dropdown.&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Select a location from the dropdown using simulated key events.&lt;/LI&gt;
&lt;/OL&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;Below is a step‑by‑step guide.&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&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;Steps to handle an autocomplete dropdown&lt;/H2&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;Locate the autocomplete input element in Chrome&lt;/H3&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;DIV&gt;Open &lt;STRONG&gt;Chrome&lt;/STRONG&gt; and navigate to the page that contains the &lt;STRONG&gt;location/address autocomplete&lt;/STRONG&gt; field.&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV&gt;Right‑click on the input field you want the synthetic monitor to interact with.&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;Select &lt;STRONG&gt;Inspect&lt;/STRONG&gt; to open &lt;STRONG&gt;Chrome DevTools&lt;/STRONG&gt; on that element.&lt;BR /&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/10981i318A4E4C9DDE6311/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;/OL&gt;
&lt;H3&gt;Copy the JS path (or a suitable selector) for the input&lt;/H3&gt;
&lt;DIV&gt;
&lt;OL&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;In &lt;STRONG&gt;Chrome DevTools&lt;/STRONG&gt;, ensure the correct element is selected in the &lt;STRONG&gt;Elements&lt;/STRONG&gt; panel.&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Right‑click that element in the DOM tree.&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Choose &lt;STRONG&gt;Copy → Copy JS path&lt;/STRONG&gt; (or copy a stable CSS selector, if preferred).&lt;BR /&gt;&lt;BR /&gt;
&lt;DIV&gt;You’ll use this selector in the JavaScript events within your Dynatrace &lt;STRONG&gt;browser clickpath monitor&lt;/STRONG&gt;.&lt;/DIV&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;/DIV&gt;
&lt;DIV id="tinyMceEditorMareeswaran_1" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image2.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/10982i210BE00E03792C60/image-size/large?v=v2&amp;amp;px=999" role="button" title="image2.png" alt="image2.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;JavaScript event 1 – Enter text and trigger the autocomplete dropdown&lt;/H3&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;DIV&gt;Create a &lt;STRONG&gt;JavaScript Event&lt;/STRONG&gt; step in your &lt;STRONG&gt;browser clickpath synthetic monitor&lt;/STRONG&gt; and paste the selector you copied into the &lt;CODE&gt;querySelector&lt;/CODE&gt; call.&lt;/DIV&gt;
&lt;PRE&gt;&lt;CODE&gt;var element = document.querySelector("#searchboxinput"); //Replace with the element which you want to perform the Location Dropdown
element.value = 'Waltham';
var event1 = new Event('input', { bubbles: true });
event1.simulated = true;
element.dispatchEvent(event1);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;DIV id="tinyMceEditorMareeswaran_2" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;What this does:&lt;/DIV&gt;
&lt;UL&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;&lt;STRONG&gt;&lt;CODE&gt;element.value&lt;/CODE&gt;&lt;/STRONG&gt; sets the text in the input (e.g., &lt;CODE&gt;Waltham&lt;/CODE&gt;).&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;The &lt;STRONG&gt;&lt;CODE&gt;input&lt;/CODE&gt; event&lt;/STRONG&gt; is dispatched so the application’s JavaScript thinks a real user typed the value, causing the &lt;STRONG&gt;autocomplete dropdown&lt;/STRONG&gt; to appear.&lt;/LI&gt;
&lt;/UL&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;You can adjust the value (e.g., city, address, or postcode) as needed for your test case.&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&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/10983iCCC6D9D92EE04114/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;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="image4.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/10984i8CE1BDF75C826917/image-size/large?v=v2&amp;amp;px=999" role="button" title="image4.png" alt="image4.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;JavaScript event 2 – Select the first location result from the dropdown&lt;/H3&gt;
&lt;OL&gt;
&lt;LI&gt;Add another &lt;STRONG&gt;JavaScript Event&lt;/STRONG&gt; step in the same &lt;STRONG&gt;browser clickpath monitor&lt;/STRONG&gt;. Use the same selector to target the input element and then simulate key presses to select an option from the dropdown.&lt;BR /&gt;&lt;LI-CODE lang="markup"&gt;var element = document.querySelector("#searchboxinput"); //Replace with the element which you want to perform the Location Dropdown
var evObj = document.createEvent('UIEvents');
evObj.initUIEvent('keydown', true, true, window, 1);
evObj.keyCode = 40;
setTimeout(function() { element.dispatchEvent(evObj); },1000);
evObj.initUIEvent('keydown', true, true, window, 1);
evObj.keyCode = 13;
setTimeout(function() { element.dispatchEvent(evObj); },2000);​&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;What this does:&lt;/DIV&gt;
&lt;UL&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Simulates a &lt;STRONG&gt;Down Arrow key press&lt;/STRONG&gt; (&lt;CODE&gt;keyCode = 40&lt;/CODE&gt;) to highlight the first autocomplete suggestion.&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Simulates an &lt;STRONG&gt;Enter key press&lt;/STRONG&gt; (&lt;CODE&gt;keyCode = 13&lt;/CODE&gt;) to select that suggestion.&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Uses &lt;CODE&gt;setTimeout&lt;/CODE&gt; to give the page time to:
&lt;UL&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Load the autocomplete suggestions.&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Apply the selection.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;If your page is slower or faster, you can tweak the delays (1000 ms / 2000 ms) to make the interaction more reliable.&lt;/DIV&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&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;What's Next&lt;/H2&gt;
&lt;H3&gt;&amp;nbsp;&lt;/H3&gt;
&lt;H3&gt;Practical tips and troubleshooting&lt;/H3&gt;
&lt;UL&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;&lt;STRONG&gt;Selector stability&lt;/STRONG&gt;: If the JS path is too fragile (e.g., dynamic IDs), consider using a more stable selector (like a CSS selector based on class/attributes) when calling &lt;CODE&gt;document.querySelector&lt;/CODE&gt;.&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;&lt;STRONG&gt;Multiple locations&lt;/STRONG&gt;: For different test locations, duplicate the same JavaScript event and just change &lt;CODE&gt;element.value&lt;/CODE&gt;.&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;&lt;STRONG&gt;Timing issues&lt;/STRONG&gt;: If the dropdown doesn’t open or the wrong item is selected:
&lt;UL&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Increase the &lt;CODE&gt;setTimeout&lt;/CODE&gt; durations.&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Confirm that the location field responds to &lt;CODE&gt;input&lt;/CODE&gt; events (some frameworks might require &lt;CODE&gt;change&lt;/CODE&gt; or other custom events too).&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;&lt;STRONG&gt;Validation&lt;/STRONG&gt;: Use screenshots and step‑level validation in the browser monitor to confirm the correct location is selected.&lt;/LI&gt;
&lt;/UL&gt;
&lt;H3&gt;&amp;nbsp;&lt;/H3&gt;
&lt;H3&gt;Create a Support ticket/ chat&lt;/H3&gt;
&lt;P&gt;If the browser clickpath monitor isn't able to select the location using the steps in this guide, along with the troubleshooting tips, please open a chat, or create a support ticket and&amp;nbsp;&lt;SPAN&gt;provide a link to the monitor you're updating and the configuration steps you have already completed.&lt;/SPAN&gt;&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;&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;&amp;nbsp;&amp;nbsp;&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/shortlink/browser-monitors-config" target="_self"&gt;Configure Browser 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; &lt;A href="https://docs.dynatrace.com/docs/observe/digital-experience/synthetic-monitoring/browser-monitors/browser-clickpath-events#javascript" target="_self"&gt;Browser monitor JavaScript events&lt;/A&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Thu, 05 Mar 2026 15:45:37 GMT</pubDate>
    <dc:creator>Mareeswaran</dc:creator>
    <dc:date>2026-03-05T15:45:37Z</dc:date>
    <item>
      <title>How to perform Location dropdown(auto complete Address) with help of JavaScript Event on browser click path synthetic monitor.</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/How-to-perform-Location-dropdown-auto-complete-Address-with-help/ta-p/209241</link>
      <description>&lt;H2&gt;Summary&lt;/H2&gt;
&lt;DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;If your web application uses autocomplete, for example, a&amp;nbsp;&lt;STRONG&gt;location autocomplete&lt;/STRONG&gt; field, like an address search box backed by Google Maps or similar), the standard synthetic recording may not reliably capture the interaction.&lt;/DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;In these cases, you can use &lt;STRONG&gt;JavaScript events&lt;/STRONG&gt; inside a &lt;STRONG&gt;browser clickpath monitor&lt;/STRONG&gt; to:&lt;/DIV&gt;
&lt;OL&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Type a value into the location search field.&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Trigger the autocomplete dropdown.&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Select a location from the dropdown using simulated key events.&lt;/LI&gt;
&lt;/OL&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;Below is a step‑by‑step guide.&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&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;Steps to handle an autocomplete dropdown&lt;/H2&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;Locate the autocomplete input element in Chrome&lt;/H3&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;DIV&gt;Open &lt;STRONG&gt;Chrome&lt;/STRONG&gt; and navigate to the page that contains the &lt;STRONG&gt;location/address autocomplete&lt;/STRONG&gt; field.&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV&gt;Right‑click on the input field you want the synthetic monitor to interact with.&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;Select &lt;STRONG&gt;Inspect&lt;/STRONG&gt; to open &lt;STRONG&gt;Chrome DevTools&lt;/STRONG&gt; on that element.&lt;BR /&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/10981i318A4E4C9DDE6311/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;/OL&gt;
&lt;H3&gt;Copy the JS path (or a suitable selector) for the input&lt;/H3&gt;
&lt;DIV&gt;
&lt;OL&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;In &lt;STRONG&gt;Chrome DevTools&lt;/STRONG&gt;, ensure the correct element is selected in the &lt;STRONG&gt;Elements&lt;/STRONG&gt; panel.&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Right‑click that element in the DOM tree.&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Choose &lt;STRONG&gt;Copy → Copy JS path&lt;/STRONG&gt; (or copy a stable CSS selector, if preferred).&lt;BR /&gt;&lt;BR /&gt;
&lt;DIV&gt;You’ll use this selector in the JavaScript events within your Dynatrace &lt;STRONG&gt;browser clickpath monitor&lt;/STRONG&gt;.&lt;/DIV&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;/DIV&gt;
&lt;DIV id="tinyMceEditorMareeswaran_1" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image2.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/10982i210BE00E03792C60/image-size/large?v=v2&amp;amp;px=999" role="button" title="image2.png" alt="image2.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;JavaScript event 1 – Enter text and trigger the autocomplete dropdown&lt;/H3&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;DIV&gt;Create a &lt;STRONG&gt;JavaScript Event&lt;/STRONG&gt; step in your &lt;STRONG&gt;browser clickpath synthetic monitor&lt;/STRONG&gt; and paste the selector you copied into the &lt;CODE&gt;querySelector&lt;/CODE&gt; call.&lt;/DIV&gt;
&lt;PRE&gt;&lt;CODE&gt;var element = document.querySelector("#searchboxinput"); //Replace with the element which you want to perform the Location Dropdown
element.value = 'Waltham';
var event1 = new Event('input', { bubbles: true });
event1.simulated = true;
element.dispatchEvent(event1);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;DIV id="tinyMceEditorMareeswaran_2" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;What this does:&lt;/DIV&gt;
&lt;UL&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;&lt;STRONG&gt;&lt;CODE&gt;element.value&lt;/CODE&gt;&lt;/STRONG&gt; sets the text in the input (e.g., &lt;CODE&gt;Waltham&lt;/CODE&gt;).&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;The &lt;STRONG&gt;&lt;CODE&gt;input&lt;/CODE&gt; event&lt;/STRONG&gt; is dispatched so the application’s JavaScript thinks a real user typed the value, causing the &lt;STRONG&gt;autocomplete dropdown&lt;/STRONG&gt; to appear.&lt;/LI&gt;
&lt;/UL&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;You can adjust the value (e.g., city, address, or postcode) as needed for your test case.&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&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/10983iCCC6D9D92EE04114/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;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="image4.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/10984i8CE1BDF75C826917/image-size/large?v=v2&amp;amp;px=999" role="button" title="image4.png" alt="image4.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;JavaScript event 2 – Select the first location result from the dropdown&lt;/H3&gt;
&lt;OL&gt;
&lt;LI&gt;Add another &lt;STRONG&gt;JavaScript Event&lt;/STRONG&gt; step in the same &lt;STRONG&gt;browser clickpath monitor&lt;/STRONG&gt;. Use the same selector to target the input element and then simulate key presses to select an option from the dropdown.&lt;BR /&gt;&lt;LI-CODE lang="markup"&gt;var element = document.querySelector("#searchboxinput"); //Replace with the element which you want to perform the Location Dropdown
var evObj = document.createEvent('UIEvents');
evObj.initUIEvent('keydown', true, true, window, 1);
evObj.keyCode = 40;
setTimeout(function() { element.dispatchEvent(evObj); },1000);
evObj.initUIEvent('keydown', true, true, window, 1);
evObj.keyCode = 13;
setTimeout(function() { element.dispatchEvent(evObj); },2000);​&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;What this does:&lt;/DIV&gt;
&lt;UL&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Simulates a &lt;STRONG&gt;Down Arrow key press&lt;/STRONG&gt; (&lt;CODE&gt;keyCode = 40&lt;/CODE&gt;) to highlight the first autocomplete suggestion.&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Simulates an &lt;STRONG&gt;Enter key press&lt;/STRONG&gt; (&lt;CODE&gt;keyCode = 13&lt;/CODE&gt;) to select that suggestion.&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Uses &lt;CODE&gt;setTimeout&lt;/CODE&gt; to give the page time to:
&lt;UL&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Load the autocomplete suggestions.&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Apply the selection.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;DIV class="paragraph-in-scc-markdown-text ___1ngh792 ftgm304 f1iaxwol"&gt;If your page is slower or faster, you can tweak the delays (1000 ms / 2000 ms) to make the interaction more reliable.&lt;/DIV&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&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;What's Next&lt;/H2&gt;
&lt;H3&gt;&amp;nbsp;&lt;/H3&gt;
&lt;H3&gt;Practical tips and troubleshooting&lt;/H3&gt;
&lt;UL&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;&lt;STRONG&gt;Selector stability&lt;/STRONG&gt;: If the JS path is too fragile (e.g., dynamic IDs), consider using a more stable selector (like a CSS selector based on class/attributes) when calling &lt;CODE&gt;document.querySelector&lt;/CODE&gt;.&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;&lt;STRONG&gt;Multiple locations&lt;/STRONG&gt;: For different test locations, duplicate the same JavaScript event and just change &lt;CODE&gt;element.value&lt;/CODE&gt;.&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;&lt;STRONG&gt;Timing issues&lt;/STRONG&gt;: If the dropdown doesn’t open or the wrong item is selected:
&lt;UL&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Increase the &lt;CODE&gt;setTimeout&lt;/CODE&gt; durations.&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;Confirm that the location field responds to &lt;CODE&gt;input&lt;/CODE&gt; events (some frameworks might require &lt;CODE&gt;change&lt;/CODE&gt; or other custom events too).&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI class="___ccc16d0 fje8fi8 f1ng9h0j f1bwykku f18jd3zf"&gt;&lt;STRONG&gt;Validation&lt;/STRONG&gt;: Use screenshots and step‑level validation in the browser monitor to confirm the correct location is selected.&lt;/LI&gt;
&lt;/UL&gt;
&lt;H3&gt;&amp;nbsp;&lt;/H3&gt;
&lt;H3&gt;Create a Support ticket/ chat&lt;/H3&gt;
&lt;P&gt;If the browser clickpath monitor isn't able to select the location using the steps in this guide, along with the troubleshooting tips, please open a chat, or create a support ticket and&amp;nbsp;&lt;SPAN&gt;provide a link to the monitor you're updating and the configuration steps you have already completed.&lt;/SPAN&gt;&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;&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;&amp;nbsp;&amp;nbsp;&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/shortlink/browser-monitors-config" target="_self"&gt;Configure Browser 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; &lt;A href="https://docs.dynatrace.com/docs/observe/digital-experience/synthetic-monitoring/browser-monitors/browser-clickpath-events#javascript" target="_self"&gt;Browser monitor JavaScript events&lt;/A&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 05 Mar 2026 15:45:37 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/How-to-perform-Location-dropdown-auto-complete-Address-with-help/ta-p/209241</guid>
      <dc:creator>Mareeswaran</dc:creator>
      <dc:date>2026-03-05T15:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform Location dropdown(auto complete Address) with help of JavaScript Event on browser click path synthetic monitor.</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/How-to-perform-Location-dropdown-auto-complete-Address-with-help/tac-p/212088#M178</link>
      <description>&lt;P&gt;Thank you for sharing this&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 18:50:11 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/How-to-perform-Location-dropdown-auto-complete-Address-with-help/tac-p/212088#M178</guid>
      <dc:creator>ChadTurner</dc:creator>
      <dc:date>2023-05-12T18:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform Location dropdown(auto complete Address) with help of JavaScript Event on browser click path synthetic monitor.</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/How-to-perform-Location-dropdown-auto-complete-Address-with-help/tac-p/295697#M1087</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;many thanks for sharing this. For me it was necessary to change step 2 to the following:&lt;/P&gt;&lt;P&gt;In addition I need a wait for 2 seconds for next step between step 1 (enter Location) and step 2 (select from maps response).&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Keydown Arrow Down nach 1 Sekunde

var element = document.querySelector("#input_YOUR_Selector");

setTimeout(() =&amp;gt; {
    const ev1 = new KeyboardEvent('keydown', {
        bubbles: true,
        cancelable: true,
        key: 'ArrowDown',
        code: 'ArrowDown',
        keyCode: 40, // einige Browser nutzen das noch
        which: 40
    });
    element.dispatchEvent(ev1);
}, 1000);

// Keydown Enter nach 2 Sekunden
setTimeout(() =&amp;gt; {
    const ev2 = new KeyboardEvent('keydown', {
        bubbles: true,
        cancelable: true,
        key: 'Enter',
        code: 'Enter',
        keyCode: 13,
        which: 13
    });
    element.dispatchEvent(ev2);
}, 2000);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2026 15:03:08 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/How-to-perform-Location-dropdown-auto-complete-Address-with-help/tac-p/295697#M1087</guid>
      <dc:creator>ToWo</dc:creator>
      <dc:date>2026-03-05T15:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform Location dropdown(auto complete Address) with help of JavaScript Event on browser click path synthetic monitor.</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/How-to-perform-Location-dropdown-auto-complete-Address-with-help/tac-p/295701#M1088</link>
      <description>&lt;P&gt;Thanks Tom, that's really helpful.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2026 15:09:22 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/How-to-perform-Location-dropdown-auto-complete-Address-with-help/tac-p/295701#M1088</guid>
      <dc:creator>HannahM</dc:creator>
      <dc:date>2026-03-05T15:09:22Z</dc:date>
    </item>
  </channel>
</rss>

