Exercises for AYNTKA GUI test automation


Table of contents


GUI Test automation

GUI1A

Browser developer tools usage

In this HTML page, use the developer tools of your web browser to identify the “Open TCO” button on the row with the name “Zington” with the use of an XPath suitable for automation.

Bonus if the same XPath works in other browsers (note that some webkits inserts their own TBODY and THEAD part of tables).

Hint: All major web browsers have developer tools with possibility to identify elements by XPath. The way they work differ though, google might be your friend here.

Write the XPath down.


GUI1B

Test automation interactions

In this HTML page, create a test automation that click the 'Open TSO' button for Zington.

Hint: All buttons has a well named id attribute.

Create an automated test case that verifies that the pop-up contains the name Zington.


GUI1C

Test automation interactions

In this HTML page, create a test automation that click the 'Open TSO' button for Zington.

Hint: This time the buttons don't have proper id attrubutes. This makes identifying them a bit more complex.

Create an automated test case that verifies that the pop-up contains the name Zington.


GUI2

Test automation with delays

In the following Exercise1C.html page, use the developer tools of your web browser to identify the “Open TCO” button on the row with the name “Zington” with the use of an XPath suitable for automation.

The buttons now become enabled with random delays. Make sure to write a test automation script that clicks the “Open TCO” button as soon as it become enabled. (hint: use Selenium “wait until” functionality, or loop until it’s enabled)

Use Selenium or javascript to click the button on the same row as the name Zington (hint: XPath with locator from parent)


GUI3

Test automation with re-created elements

In the following Exercise1D.html page, use the developer tools of your web browser to identify the “Open TCO” button on the row with the name “Zington” with the use of an XPath suitable for automation.

This time the button element is recreated rather than just being enabled. This is quite common with javascript frameworks. Hint: Avoid "StaleElementException" by using descriptor and fetching the element new each time.

Use Selenium or javascript to click the button on the same row as the name Zington (hint: XPath with locator from parent)


GUI4-5

Test automation with page external components

Often login solutions rely on external components that are displayed as part of a web page through IFRAMEs. This exercise will provide training for interacting with iframes, tabs, inputs, and alerts.

In the following Exercise4.html page, perform a login with any user name and password, verify that the alert displays the same name as entered in the user name field.

The login resides in a page that is displayed through an iframe element. The content of the iframe is a totally different web page, and many test automation tools require specific actions to interact with content in an iframe.

This exercise will also provide new tabs to grab and interact with.

Use any test automation tool to perform a login and then


GUI5

Test automation with page external components 2

This exercise is accessed through Exercise 4.

Accessing other browser tabs generally is performed in a similar fashion as iframe content.


GUI6

Test automation with modal popup

This exercise trains you in closing pop-up dialogues in separate windows.

In the following Exercise6.html page you will first need to click the enabled button. This opens a pop-up dialogue in a separate browser window. When this dialogue is closed the last button is enabled for you to click to display the 'YAY!' success message. Verify this message to complete this task.


GUI7

Test automation with pre-filled input fields

This exercise page has a terribly annoying input field with a default value that needs to be cleared to complete this task.

In the following Exercise7.html create a test automation that clears the field and then click the button to display the 'YAY!' success message.
Verify this message to complete this task.


GUI8

Test automation with date management

For this exercise you need to work with reltive future dates. Many systems include dates, and learning to parse dates is essential for many types of tests.

In the following Exercise8.html create a test automation that registers an order and confirms the expected delivery date is in two days.
Verify the delivery confirmation message to complete this task - and make sure the script will work for months and years on.


GUI9

Test automation hover element

For this exercise you need to work with mouse positions. Many systems include tooltips and other types of elements that are triggered on hover.

In the following Exercise9.html create a test automation that trigger the tooltip that is displays when the mouse pointer is moved above the given field.

Verify the following:

  1. The text of the tooltip is not displayed before the hovering
  2. The text of the tooltip is displayed upon hovering
  3. The text of the tooltip is not displayed when the mouse pointer has left the field

Technical tester

Technical1

W3C validation service

The W3C regulates Internet standards. Checking a web page source against their validation service can be very powerful.

Check the www.zington.se landing page generated source with the W3C validation service.

Note: The source seen by browser right-click option 'view source' is not the same as the generated source since that is only the initial source, not the one altered by javascripts.


Technical2

Link crawler

Link crawlers can be very powerful tools. Learn to use them.

Use any link crawler to crawl the Zington external web for failing resources.