[WebUI] Assert Element Attribute Value
Last updated: August 2026
Prerequisites
This keyword is available from Katalon Studio version 11.2.0+.
Description​
Assert that the value of the named attribute exactly matches attributeValue within a specified timeout.
Keyword name: assertElementAttributeValue
Katalon Studio polls the condition until it is satisfied or the timeout expires. If the condition is not satisfied, the keyword applies the configured failure handling: STOP_ON_FAILURE stops execution, CONTINUE_ON_FAILURE records a failed step and continues, and OPTIONAL logs a warning and continues.
Parameters​
| Parameter | Parameter Type | Required | Description |
|---|---|---|---|
to | TestObject | Yes | Represents the web element to evaluate. |
attributeName | String | Yes | Specifies the name of the attribute to evaluate. |
attributeValue | String | Yes | Specifies the expected attribute value. The comparison is exact. |
timeOut | int | Yes | Specifies the maximum time, in seconds, to wait for the condition. A negative value uses the configured WebUI element timeout. |
flowControl | FailureHandling | No | Specifies the failure handling behavior for execution failures. When omitted, this parameter uses the project default failure handling. |
Examples​
WebUI.assertElementAttributeValue(findTestObject('Page_Main/element'), 'class', 'active', 10)
WebUI.assertElementAttributeValue(findTestObject('Page_Main/element'), 'class', 'active', 10, FailureHandling.CONTINUE_ON_FAILURE)