Skip to main content

[Windows] Verify Element Attribute Value

Description

Wait until the given element has an attribute with the specified name and value within the given time in the second unit.

Keyword name: verifyElementAttributeValue

Parameters

Parameter Parameter TypeRequiredDescription
windowsObjectWindowsTestObjectYesAn object that describes locator and locator strategy of the target element that needs to wait for.
attributeNameStringYesThe name of the attribute name to verify.
attributeValueStringYesThe value of the expected attribute value to verify.
timeoutIntegerYesSystem will wait at most timeout (seconds) to return the result.
  • If timeout = 0, Katalon Studio will use the default page load timeout.
  • If timeout < 0, throws IllegalArgumentException.

Returns

Parameter TypeDescription
Booleantrue if the element has the attribute with the specified name and value; Otherwise, false.

Example

"Verify to expect 'Text Editor' is the value of attribute 'Name' of the edit panel"
assert Windows.verifyElementAttributeValue(findWindowsObject('Object Repository/Edit'), 'Name', 'Text Editor', 10)