I used the Actions to mouse hover in FF and chrome , it is working fine. But the same code is not working in safari. I am using mac OS and selenium webdriver and java.
I tried below code.
new Actions(driver).moveToElement(element).build().perform();
JS:
String mouseOverScript = "if(document.createEvent){var evObj = document.createEvent('MouseEvents');evObj.initEvent('mouseover', true, false); arguments[0].dispatchEvent(evObj);} else if(document.createEventObject) { arguments[0].fireEvent('onmouseover');}";
JavascriptExecutor js = (JavascriptExecutor) driver;
js.executeScript(mouseOverScript, element);
It is a show stopper issue. any help is appreciated.