|
Post by leiwang on Apr 14, 2017 6:41:02 GMT
It is reported that the mouse cursor cannot be seen when calling HoverMouse
Currently we are using selenium webdriver's API moveToElement to implement the keyword 'HoverMouse'. Some other selenium users also reported the cursor lost problem, but it seems that there is no answer. I don't know the reason, here is only my guess, Selenium doesn't really control the mouse itself but sends an event that will be accepted by the browser, so we can see the "hover effect", but not the mouse cursor. We have a workaround if you really want to see the mouse cursor, please call our Robot.mouseHover as below: //suppose that component is a org.safs.model.Component you want to hover mouse on WebElement we = SeleniumPlus.getObject(component); //get the screen location of the point (5,5) relative to the component Point hoverPoint = WDLibrary.getElementOffsetScreenLocation(we, "5", "5"); //hover mouse on that point forever Robot.mouseHover(hoverPoint, Constants.TIMEOUT_HOVERMOUSE_STAY_FOREVER);
|
|