Selenium IDE "verifyNotSelectedIndex" and "verifyNotSelectedIndexes" Command Example

"verify" and "assert" are same in function but difference between both of them is when "verify" command fails selenium will not stop execution of remaining commands while selenium IDE will stop execution on failure of "assert" command. "verifyNotSelectedIndex" and "verifyNotSelectedIndexes" are verification
commands so selenium IDE will not stop its execution even if anyone from them will fail. It will just return error in log and go for executing next command.

"verifyNotSelectedIndex" Command
This command will works with only single selected value of drop down and list box . It will check if selected value's index is same as expected? If yes then it will return error message in log like '[error] Actual value '5' did match '5''. If don't match then it will pass. If found multiple selections in list box then it will return '[error] More than one selected option!'.

"verifyNotSelectedIndexes" Command
"verifyNotSelectedIndexes" Command's function is same but it is working for single selected as wel for multiple selections from list box.

New Test

Look in to above example, 1st "verifyNotSelectedIndex" command will fail and return error "[error] Actual value '5' did match '5'" because both values matches. 2nd "verifyNotSelectedIndex" command will pass. 1st "verifyNotSelectedIndexes" will fail and 2nd "verifyNotSelectedIndexes" command will pass. Let me knows the reason why?

Experiment above given example in your own software application to get better idea on both of these commands. Click here to read and learn more selenium IDE tutorials with examples of commands.

No comments:

Post a Comment