Reputation: 89
I am currently using Selenium IDE to test a website with a simple drop down menu that has options like "Trial" and "Invoice" and "Portal". I do not want to select the options, but just to make sure they are available. How would I do this in Selenium IDE?
I have tried commands like verifyselectedvalue, verifyselectedoptions and verifytext, and verifyvalue, but they seem to give me a positive no matter what I enter in as value, even "sdhjgfhsg."
I have checked previous posts on this topic, there are many close, but not quite what I am looking for.
Much thanks,
Ilya
Upvotes: 0
Views: 4875
Reputation: 21
Additional hint: To test if an option is selected just use "verify selected label" in Selenium IDE
Example: verify selected label | id=abc | 23:59
Upvotes: 2
Reputation: 544
I did a test using a website has css menu drop down and I found the answer.
Record your script clicking on the css menu (each one) to get the element and after, change the command "click" to "verifyText". After that, set the field value (Selenium IDE) the text that you can verify (e.g.: Trial, Invoice and Portal).
I did this:
> verifyText | css=li.has-sub > ul > li > a > span | Trial > verifyText | //div[@id='cssmenu']/ul/li[2]/ul/li[2]/a/span | Invoice > verifyText | css=li.last > a > span | Portal
Upvotes: 0