Skip to main content

You are here

Mouse Movements

How to simulate mouse movement in Selenium WebDriver

This code navigates to a website It then simulates moving the mouse from one menu link to the other. Observe the dropdown menu as focus shifts from one menu option to the other. There is a slight delay between each menu option (curtesy of Thread.sleep).

For some strange reason a previously visited menu link's dropdown remained even after focus shifted. Hoping some gurus can explain that to us in the comments sections. smiley

Premium Drupal Themes by Adaptivethemes