Skip to main content

[Windows] Get Attribute

Description

Get the attribute value of a Windows element

Keyword name: getAttribute

Parameters

Parameter Parameter TypeRequiredDescription
windowsObjectWindowsTestObjectYesAn object describing the locator and locator strategy to find a Windows element.
attributeStringYesName of the attribute.

Returns

Parameter TypeDescription
StringValue of the attribute.

Example

"Get attribute value of 'Name' of the edit panel"
def attributeValue = Windows.getAttribute(findWindowsObject("Object Repository/Edit"), 'Name')
assert attributeValue == 'Text Editor'
Was this page helpful?