Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

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

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

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
avatar
freesky
Amateur
Amateur
Posts : 72
Join date : 2011-04-13

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

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