Skip to content

Instantly share code, notes, and snippets.

@gr4y
Created August 3, 2012 12:28
Show Gist options
  • Save gr4y/3247122 to your computer and use it in GitHub Desktop.
Save gr4y/3247122 to your computer and use it in GitHub Desktop.
Handling mouseover with Selenium. How it doesn't work!
// this doesn't work
final Locatable hoverItem = (Locatable) element;
final Mouse mouse = ((HasInputDevices) driver).getMouse();
mouse.mouseMove(hoverItem.getCoordinates());
// this doesn't work too
Actions builder = new Actions(driver);
builder.moveToElement(element).build().perform();
// executing javascript doesn't work either.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment