How to verify a label is editable or not

suppose i have a lable named bankaccoubt, adter click of edit, that should have value , but no scope to edit. how to veriffy that.

Hi Snehasmita,

Since its only label, it is really not editable.

And what do you mean no scope to edit? Can you expand?

Thanks, Arnel. What i mean to say. There are many fields in the page where different labels are there. ex.
In bank info update profile page, There may be label as Nick_NAME,PRIMARY E-mail address.
Where on click of edit button, Nick_Name field can be edited as the text box under the label is editable, but the Primary email address has data that cannot be edited as no chkbox get opened.

So my doubt is how to verify PrimaryEmail Address field is non editable( no checkbox get opened on click of edit)

Hi Snehasmita,

You can try this verify options in your problem:

If you want to verify a field if it is enabled or not use this code:

WebUI.verifyElementClickable(findTestObject(‘your text field’))
WebUI.verifyElementNotClickable(findTestObject(‘your text field’))
*it also works on text field.

Or, you can observe in the inspect element, see the attributes behavior when it is enabled or not.
there should be a change in its attribute something like disabled=“true” or disabled=“false” or in class or name or id or any attribute that is available in your element. When that happens, use this code:

WebUI.verifyElementAttributeValue(findTestObject(‘your text field’), ‘attributeName’, attributeValue, 30)

And, since you mention checkbox you can also verify it, refer to the link below[WebUI]+Verify+Element+Checked

Hope that helps you :slight_smile: