繁花如伊
基于这,这个我的博客文章使用Selenium2Webriver使用以下代码触发了悬停:String javaScript = "var evObj = document.createEvent('MouseEvents');" +
"evObj.initMouseEvent(\"mouseover\",true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);" +
"arguments[0].dispatchEvent(evObj);";((JavascriptExecutor)driver).executeScript(javaScript, webElement);