It is possible to include error handling in a visual test when using verification; this will ensure the test does not pass or fail depending on whether the element is verified but carries on through the rest of the steps.
The first step is to add in the verification. This is done by right-clicking on the relevant test step, selecting "Insert - Test Logic and Verification" as shown below:
After following the verification wizard to select the type of verification requried, for example that the element exists or the text matches; we can then set up the error handling. It is important that the error handling step is inserted before the verification step.
To insert the error handling highlight the test step before the verification step, right click and "select Insert - Error Handling" as shown below:
The error handling step is inserted and it is possible to change the settings in the step properties. In the 'Action to take' field you can either end the test, skip to the next step, skip to a certain step or retry the step:
The error handling provides the ability to determine that a test simply does not fail if the verification failed but will instead carry on. It can also be enhanced to perform certain test steps depending on the verification outcome or to write certain information to a variable or log.