[Windows] Get Element Position
Description
Get the position of the WebElement
that is found by using locator value of the given windowsObject
.
Keyword name: getElementPosition
Parameters
Parameter | Parameter Type | Required | Description |
---|---|---|---|
windowsObject | WindowsTestObject | Yes | An object that describes locator and locator strategy to find Windows Element. |
Returns
Parameter Type | Description |
---|---|
Position of the element | Point indicating the element's position. |
StepFailedException | Throws an error if Katalon Studio cannot find the specified element. |
Example
import org.openqa.selenium.Point as Point
Point position = Windows.getElementPosition(findWindowsObject('Object Repository/Notepad/Edit'))
println String.format("{ x: %d, y: %d }", position.getX(), position.getY())