Exercises for AYNTKA structured data


Table of contents


Data formats

Data1

Serializing an object

Use any programming language of your choice to create a class called GuiElement. GuiElements should have the following properties:

For any GuiElement a method to check if the element is displayed should be implemented.

Make sure any instance of a GuiElement could be serialized to both JSON and XML.


Data2

Deserializing

Make sure the XML and the JSON from the exercise above can be deserialized back into an object and assert its properties.


Data3

XPath introduction

In the following Exercise1A.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).

Use Selenium or javascript to click the button on the same row as the name Zington (hint: XPath to value)


Data4

More complex XPath use

In the following Exercise1B.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).

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