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:
disabled="disabled"
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);