Share
Go down
rabbithell
Posts : 1
Join date : 2011-05-23

verifying that only specific values are present in a drop down list

on Mon May 23, 2011 9:57 pm
Hi there, 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 other than that which I am expecting is an error.

For example, using a basic html Single Select drop down list
---------------------------------------------

---------------------------------------------
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 are 'verifyNotSelectedLabel' and 'verifyNotSelectedValue', 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,
Rabbithell
freesky
Amateur
Amateur
Posts : 72
Join date : 2011-04-13

Re: verifying that only specific values are present in a drop down list

on Fri May 27, 2011 9:09 am
maybe you can verify the specific value present in the html source.
Back to top
Permissions in this forum:
You cannot reply to topics in this forum