Tami Judge
posted this on March 02, 2011 13:00
Verifying Select Lists With Selected Options
Up until this point, we have validated text fields that are empty, but it would be a rarity to have an empty select list. The Inquiry section contains a select list. This can be examined in a similar fashion to what we have previously done.
Our screen looks like this:
And our requirement states, “The CONTACT page should have an inquiry section”.
So we will create a final scenario with that name.
1. From the Dashboard, click the Janova Website Application.
2. Click on Features at the top of the screen.
3. Click Add a Scenario at the bottom of the screen.
4. Enter “The CONTACT page should have an Inquiry section” as the name.
5. Click on Save and Continue
6. Select “go to a page” in the syntax drop-down.
7. Enter “Home” for the name of the element.
8. Click Save and Continue.
9. Select “click an element” from the syntax drop-down.
10. Change And to When in the first menu.
11. Enter “How Janova Works” for the name of the element.
12. Click Save and Continue.
13. Select “click an element” from the syntax drop-down.
14. Change And to Then in the first menu.
15. Enter “CONTACT” as the name of the element.
16. Click Save and Continue.
17. Select “verify text on page” from the syntax drop-down.
18. Change And to Then.
19. Change How Janova Works to CONTACT.
20. Enter “TOPIC” in the text field.
21. Click Save and Continue.
22. Select “verify element attribute” from the syntax drop-down.
23. Enter “Topic Selection” for the element name.
24. Select “with options” from the attributes menu.
25. Enter “| Product Feature Question | Sales/Pricing Question | Technical Support Question | Marketing/PR Question | Business Partnership Question | HR/Employment Question | Other” for the options.
Note: The pipe character - | - is the way that Janova distinguishes between unique labels within the same text entry field. When you type "| 1 | 2 | 3" you are saying that the first entry in the select list should be a '1', the second a '2', and so on.
26. Click Save and Continue.
27. Select “ verify text on page” from the syntax drop-down.
28. Enter “Language:” in the text field.
29. Click Save and Continue.
30. Select “verify element attribute” from the syntax drop-down.
31. Enter “Question Text Field” for the element name.
32. Change its attribute to “which is empty.”
33. Click Save and Close.
Continue on to Page Files for Verifying Select Lists With Selected Options.