How to check a button with some link is enabled in Selenium IDE(firefox addon)

1.2k views Asked by At

How to check a button with some link is enabled in Selenium IDE(firefox addon)?

The scenario is like that button is actually enabled. But sometime due to some issue it becomes disable...i have to test if it is enable or not

2

There are 2 answers

0
Rupesh Shinde On

I believe if Web-element is Checked then it is Enable and if its Unchecked then Disabled.

To Check if the Button is Enable/Disable you can use

storeChecked ( locator, variableName )

locator - an element locator pointing to a checkbox or radio button

variableName - the name of a variable in which the result is to be stored.

If you want your script to Stop if the element returns False.

assertChecked ( locator )
assertNotChecked ( locator )

If you want your script Not to Stop if the element returns False.

verifyChecked ( locator )
verifyNotChecked ( locator )

Also you can refer the List of all Selenium IDE Commands available Here. Hope that will help you.

0
Pramod On

I you want to check if a button is enabled or not you can use

<tr>
<td>assertEditable</td>
<td>Locator</td>
<td>Button</td>

This will return true if the button is editable and false if not.