Code examples

Example: Custom date ElementHandler combining multiple HTML elements

Creates a new Element Handler for a date that is compiled into a form via 3 drop downs. By defining a custom ElementHandler that date can be approached in steps as one element. This example also illustrates the use of the Date object Values.

Example: Custom steps with a table

In this example, a step is defined which  is going to look for a particular element in the parent container.In this case a span is which contains a specific error message. Makes maximum reuse of ElementDescriptor.

Example: Override existing ElementHandler

Illustrates how the default behavior of a textbox element can be overwritten by defining a new ElementHandler so that only certain methods of existing overrides are overwritten. In this case, look for a div with the right text (the description in the textbox) and then look for a textbox within the parent container of the div.

Example: Simple new ElementHandler

In this example,  a new tab element is defined that can be used in all of the standard steps. Also illustrates the use of the addition of the standard parent functionality in custom elements..

Example: Using an optional id from a command-line parameter

In this example, we create a component that receives a unique ID via the command line, but if the ID is not specified it will generate one itself. Where the tests are performed on the build server, the ID of the build is used to identify test data.