30.2 Manual creation of procedures

There are several ways to create procedures and insert procedure calls. We start with the manual approach where an (empty) Procedure node is inserted, and then the corresponding actions are moved into it. Then we will create the corresponding procedure call.

It is good to know these basic steps. However, there is a second, more elegant way to create procedures, which we will show afterwards.

So let's insert a procedure by hand: We begin by creating the Procedure node and giving it a suitable name.

Create procedure node
Figure 30.2:  Create procedure node

In the second step we fill the procedure with the corresponding reusable actions.

Fill procedure
Figure 30.3:  Fill procedure with content

In the third step we insert a procedure call in place of the three moved mouse clicks.

Insert procedure call
Figure 30.4:  Insert procedure call
Select procedure
Figure 30.5:  Select procedure

To really gain value from the procedure, we now need to replace the content of the test step in the second test case with a call to the "reset" procedure as well.

You can do this as described above or perform the following alternative steps to create the procedure call:

The test suite should then look as follows:

Test suite with procedure
Figure 30.6:  Test suite with procedure

If you now run the test cases, they should work as before. In the log you can now also see the procedure calls and their execution.