Selenium: How to use x and y coordinate position
I'm using the Selenium method mouseMoveAt(java.lang.String locator,java.lang.String coordString), which requires a coordString.
For example : coordString - x,y position (10,20). If I use 10 for x and 20 for y coordinate, w开发者_如何学Gohat does it mean?
mouseMoveAt(E,(x,y))
This means you simulate the mouse moving to a specific (x,y) location relative to the top-left corner of element E, independent of where the element lies on screen.
Look at the org.openqa.selenium.Point class and getLocation() method of the WebElement class.
Point getLocation() Where on the page is the top left-hand corner of the rendered element? Returns: A point, containing the location of the top left-hand corner of the element
加载中,请稍侯......
精彩评论