Incorrect Functionality of 'Verify Element Not Clickable' function

The actual object is greyed out, but the function returns False and says the object is clickable.

Used Chrome for testing. Locators for the object are - ‘Text’ and ‘Tag’.

Interaction with the object using ‘Click’ works fine.

More details can be provided if necessary.

Details necessary. :face_with_raised_eyebrow:

How about a bit of HTML code of the object in question?

Just so the bug can be reproduced.


`<a class="btn btn--primary pull-right btn--mobile-full-width" ng-disabled="!model.AllowAcceptAgreement" ng-click="AcceptAgreement()" disabled="disabled" xpath="1">Accept agreement</a>`
1 Like

I see disabled=disabled. Is Katalon looking at these flags for clickability

It verifies the object as clickable.

2019-01-23 09:05:01.712 e[1;31mERRORe[0;39m e[36mc.k.k.core.keyword.internal.KeywordMain -e[0;39m e[31m❌ Object ‘Object Repository/EXT/Accept_ETG_Application/Page_Agreement Review/Accept_Agreement_Button’ is clickablee[0;39m
2019-01-23 09:05:02.089 e[1;31mERRORe[0;39m e[36mc.k.k.core.keyword.internal.KeywordMain -e[0;39m e[31m❌ Unable to verify object ‘Object Repository/EXT/Accept_ETG_Application/Page_Agreement Review/Accept_Agreement_Button’ to be NOT clickable (Root cause: com.kms.katalon.core.exception.StepFailedException: Object ‘Object Repository/EXT/Accept_ETG_Application/Page_Agreement Review/Accept_Agreement_Button’ is clickable)e[0;39m
2019-01-23 09:05:02.106 e[1;31mERRORe[0;39m e[36mc.k.k.core.main.RawTestScriptExecutor -e[0;39m e[31m❌ verifyElementNotClickable(findTestObject(“EXT/Accept_ETG_Application/Page_Agreement Review/Accept_Agreement_Button”)) FAILED.e[0;39m

However, using

Verify Element Has Attribute function with ‘disasbled’ input returns true

According to the source for this keyword:

if (foundElement.isEnabled()) {
                        WebUIKeywordMain.stepFailed(MessageFormat.format(StringConstants.KW_LOG_PASSED_OBJ_X_IS_CLICKABLE, to.getObjectId()),
                                flowControl, null, true)
                        return false

The WebUI API falls back to selenium’s element.isEnabled() method to determine whether an element is clickable. From what I can find, this method looks at the disabled attribute value as a boolean, not a String:

The following are deemed to be “boolean” attributes, and will return either “true” or null:

async, autofocus, autoplay, checked, compact, complete, controls, declare, defaultchecked, defaultselected, defer, disabled, draggable, ended, formnovalidate, hidden, indeterminate, iscontenteditable, ismap, itemscope, loop, multiple, muted, nohref, noresize, noshade, novalidate, nowrap, open, paused, pubdate, readonly, required, reversed, scoped, seamless, seeking, selected, truespeed, willvalidate

My guess is that because the disabled attribute value in your html snippet is presented as a String:


Selenium isn’t recognizing it properly as a boolean, and is probably returning a null. Instead of using verifyElementNotClickable(), try using:

WebUI.verifyElementAttributeValue(myObject, "disabled", "disabled", 30);

1 Like

Hi mate,

Thanks for your research.

But according to this article HTML Boolean Attributes | JoeQuery - the presence of ‘disabled’ tag already means the presence of the boolean attribute, regardless of its value

It means ‘‘disabled’’ is a boolean value not a String

Sure, I’m just guessing at how Selenium interprets the attribute, not so much how the attribute value type is handled in general. Can you try using Selenium instead of Katalon’s WebUI API?:

WebElement element = WebUiCommonHelper.findWebElement(ObjectRepository.findTestObject(‘Object Repository/EXT/Accept_ETG_Application/Page_Agreement Review/Accept_Agreement_Button’), 30);
assert !element.isEnabled();

I’m curious to see if the result is any different.

I’ll try to do that on the weekend. Sorry to busy during working days.
Will keep you posted

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.