There is an invisible element on my HTML page which becomes visible when a mouse hover is done on the element. What I Have to do is
My case we had a table of rows, if mouse over on the row, one of the column(td) should display some 4 icons, we should click on it.
Action action=new Action(driver);
action.moveToElement(hoverElt).clickAndHold().build().perform();
It worked for me.
moveToELement()
move your control to the element
clickAndHold()
clicks and holds the hovered element, so that its easy for us to do operation on visible elements.