Skip to main content

[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 TypeRequiredDescription
windowsObjectWindowsTestObjectYesAn object that describes locator and locator strategy to find Windows Element.

Returns

Parameter TypeDescription
Position of the elementPoint indicating the element's position.
StepFailedExceptionThrows 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())
Was this page helpful?