Tami Judge
posted this on March 01, 2011 16:21
Clicking a Link
Continuing from our earlier tutorials, the next requirement to fulfill is that of clicking the How Janova Works Link and seeing if the How Janova Works page loads. There are a few ways to go about doing this, but we will simply click the link on the home page, and then verify that the Title header and middle section images are in place. From the image below, this would mean validating that "How Janova Does Web Testing" in text appears, and that "Doggle Screen" and “Scenario Example" similarly appear, but as Images.


To check this requirement, we will create another Scenario:

1. From the Dashboard, click on Janova Website in the left sidebar to select the Application.

2. Click on Features in the top menu.

3. Click Add a Scenario at the bottom of the screen
4. Enter ‘When the “How Janova Works" link is clicked, the How Janova Works page should load’ as the Scenario Name

5. Click Save and Continue.
6. Select “go to a page” from the syntax drop-down.

7. Enter "Home" for the page name.
8. Click Save and Continue.

9. Select “click an element” from the syntax drop-down.
10. Set the Given, When, Then select list to When.
11. Enter “How Janova Works Link” for the element name.
12. Click Save and Continue

13. Select “verify text on page” from the syntax drop-down.
14. Set the Given, When, Then drop-down to Then.

15. Change the name of the page from "Home" to "How Janova Works".

16. Enter “How Janova Does Web Testing” for the text.
17. Click Save and Continue.
18. Select “verify text on page” from the syntax drop-down.

19. Enter “Identify What to Test” in the element name field.
20. Click Save and Continue.

21. Select “verify element on page” from the syntax drop-down.
22. Enter “CONTACT” in the element name field.
23. Click Save and Close.

Note: You may have noticed that we changed the Home page to How Janova Works during the Scenario. This tells Janova that we have moved on to another page, and that each subsequent action will take place on that page. Furthermore, any new Page files will be created and associated with the new page rather than Home.
To finish this Scenario, we must define its Page files, continuing with Clicking a Link Page Files.