This is our very first article in Selenium, we hope it is helpful for Selenium users. Keep visiting Codoid blogs for more articles in the near future.
//Getting mouse from driver object Mouse mouse =((HasInputDevices)driver).getMouse(); //Invokes mouseMove method by passing element coordinates as argument mouse.mouseMove(((Locatable)element).getCoordinates());
Using Advanced User Interactions API
Actions builder = new Actions(driver); builder.moveToElement(element).perform(); //Note: (Preferable for Firefox and HTMLUnit drivers)