How to do Mouse hover on Image in selenium web driver to get menu list
问题 I am trying to mouse hover on image to display menu list. My HTML code is: <img id="logo" src="/web/images/header/img_Logo_Topbar.png"> But I am trying Xpath as "//*[@id='logo']" . There is no response. I am using this script: Actions a1 = new Actions(driver); a1.moveToElement(driver.findElement(By.xpath("//*[@id='logo']"))) .build() .perform(); Thread.sleep(1000L); 回答1: It's looks like a bug, I'm not sure what is the solution for this but if you want alternate solution to perform mouse hover