[WebUI] Is Element Has Attribute
Last updated: August 2026
Prerequisites
This keyword is available from Katalon Studio version 11.2.0+.
Description​
Check whether the named attribute exists and its value is not null within a specified timeout.
Keyword name: isElementHasAttribute
A condition that is not satisfied normally returns false and does not fail the test step. Unexpected execution errors apply the configured failure handling. If execution continues after an error, the keyword returns false.
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. |
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. |
Returns​
| Return Type | Description |
|---|---|
| boolean | Returns true when the named attribute exists and its value is not null; otherwise, returns false. |
Examples​
boolean result = WebUI.isElementHasAttribute(findTestObject('Page_Main/element'), 'class', 10)
boolean handledResult = WebUI.isElementHasAttribute(findTestObject('Page_Main/element'), 'class', 10, FailureHandling.CONTINUE_ON_FAILURE)