“assertEditable” and “assertNotEditable” command in selenium IDE

“assertEditable”  Command
You can use “assertEditable” command with only and only input fields like text box, list box, drop downs etc. You can check and assert that targeted element is editable or not. If targeted element is not editable then it will stop execution of remaining selenium script.
New Test
Command Target Value
open https://www.google.com
assertEditable id=gbqfq
assertNotEditable id=gbqfq
assertEditable id=gbqfq

Here in this example, second command(assertEditable) will check that target element search text box(id=gbqfq)is editable or not. If its editable then and then it will execute next command. If it is not editable

then it will stop execution of next all commands.

“assertNotEditable” Command
Same as “assertEditable”  Command, “assertNotEditable” command will fail to execute if specified element is not editable. Here it will check opposite condition compared to “assertNotEditable” command.
Third command(assertNotEditable) will check that is search text box(id=gbqfq)is editable or not. It will stop execution if it is editable.

Leave a Reply

Your email address will not be published. Required fields are marked *