Troubleshooting
Articles about how to solve the most common problems
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Mareeswaran
Dynatrace Advisor
Dynatrace Advisor

Summary: Sometimes, a page requires you to hover over or mouse over an element rather than clicking on it. This can be done in Dynatrace Synthetic using a JavaScript event.

 

Steps to perform a mouseover event in a Browser clickpath

  1. Go to the relevant page in a Chrome browser.

  2. Right-click on the element that you want to interact with on the page-> Inspect the element, which will open the developer tools

     

    image1.png

  3. Right-click on the element in the Web Developer Tools -> Copy -> Copy JS path

     

    image2.png

  4. Paste the JS path in the below element value, and add this JavaScript code into the JavaScript Event of your Browser clickpath monitor.image3.png

    function triggerevent(element) 
    {
    var evt = document.createEvent("MouseEvent");
    evt.initMouseEvent("mouseover",true, true);
    element.dispatchEvent(evt);
    }
    
    var element = document.querySelector('button[id="testid"]'); //Replace with the element which you want to perform the mouseover action.
    triggerevent(element);

 

What's next

Open a chat or contact support if 

  • you need to check the logs for an HTTP Monitor running on a public location, or
  • The issue is still not resolved after taking the above actions

 

What to read next: 

HannahM_0-1765284143188.png  Synthetic Troubleshooting Map

HannahM_1-1765284143223.png  Synthetic Browser Monitor Error Codes

HannahM_2-1765284143255.png   Browser monitor JavaScript events

HannahM_3-1765284143288.png  Configure Browser monitors

HannahM_4-1765284143323.png  Browser Monitor how-to guides

Version history
Last update:
‎09 Dec 2025 12:48 PM
Updated by:
Comments
ChadTurner
DynaMight Legend
DynaMight Legend

@Mareeswaran Thank you for sharing this

cleoleeps
Observer

Thank you so much! This complete the puzzle that i had for synthetic monitoring!!