I hope someone is able to help me. I am trying to determine whether or not Selenium IDE can verify that only specific values are present in a drop down list, and should anything else appear within the drop down list it is an error.
For example, using a basic html Single Select drop down list :
<select id="drop_down_list"> <option value="Test">Please select...</option> <option value="Saab">Saab</option> <option value="Mercedes">Mercedes</option> <option value="Audi">Audi</option> </select>
I know I can verify the 'Label' of each selectable value using (for example) :
verifySelectedLabel : //select[@id='drop_down_list'] : Please select...
I know I can verify the 'Value' of each selectable value using (for example):
verifySelectedValue : //select[@id='drop_down_list'] : Test
And I know I can do this for each other selectable value displayed.
But what if for whatever crazy scenario, a Dev decided to add 'Ford' to the drop down list, and he/she did not make anyone aware of this ? My tests would pass as those selectable values which I am expecting are still present.
Is there is a way of verifying that no other values other than those I am expecting are also contained within the drop down list ?
I know there is 'verifyNotSelectedLabel' and 'verifyNotSelectedValue' available for use, and these work perfectly when I can specify the 'Labels' and 'Values' accordingly, but they dont help in this particular scenario.
Fingers crossed someone can help, many thanks in advance to all,