"assertNotSelectedLabel" and "assertNotSelectedLabels"
- WebElements : Used for drop down and list box type elements.
- If any of the assert command fails, selenium IDE stops
its execution immediately.
- It fails if selected label string matches the expected label string. Else it will be pass.
Command | | Value |
|
|
|
addSelection |
| label=Germany |
assertNotSelectedLabel |
| India |
removeSelection |
| label=Germany |
addSelection |
| label=India |
assertNotSelectedLabel |
| India |
First "assertNotSelectedLabel" command will become pass because actual
value will not match with expected value. But
last"assertNotSelectedLabel" command will fail. Run both examples in
selenium IDE to confirm its function.
"assertNotSelectedLabels" Command
"assertNotSelectedLabels" command works same as "assertNotSelectedLabel"
command but it is supporting multiple labels too. It will return error
like '[error] Actual value 'India,Italy' did match 'India,Italy'' if
both values will match.
Command |
| Value |
open |
|
|
addSelection |
| label=Italy |
addSelection |
| label=Germany |
assertNotSelectedLabels |
| India,Italy |
removeSelection |
| label=Germany |
addSelection |
| label=India |
assertNotSelectedLabels |
| India,Italy |
Comments