"Verify Element Not Clickable" fails while button is disabled


#1

Hi.
I have a test case where I want to check that button is disabled on the form, so I selected “Verify Element Not Clickable” for it, but it keeps failing saying that button is actually clickable.

button_disabled.png

check_fail.png


#2

Have the same issue. Does enyone knows how to solve this? Or do we need to use something else to check disabled button?


#3

Hi guys,
With this keyword, the web element MUST have "disabled" as the input element. Otherwise, the keyword “Verify Element Not Clickable” won’t work.

keyword.png


#4

Is there a workaround for it?


#5

Alina Poceviciene said:

Have the same issue. Does enyone knows how to solve this? Or do we need to use something else to check disabled button?

I just found a workaround.

Use WebUI.verifyElementAttributeValue to see if your object class contains disabled.

You can also just use an assertion call.


#6

Jun-Ho Kim said:

Alina Poceviciene said:

Have the same issue. Does enyone knows how to solve this? Or do we need to use something else to check disabled button?

I just found a workaround.

Use WebUI.verifyElementAttributeValue to see if your object class contains disabled.

You can also just use an assertion call.

I think it will be **WebUI.verifyElementHasAttribute **


#7

Hi, same issue here.


#8

Hi folks…
use “verifyElementNotClickable” or Verify Class name. its work.


#9

Thanks guys, I did this way and it works for me:
def hasClass(def objectId, def className ) {
return WebUI.executeJavaScript(“return document.getElementById(’”+ objectId + “’).classList.contains(’” + className + “’)”, null)