TestDriver is a vision-based testing tool and is not aware of the underlying HTML structure of the page. Pay attention to the following tips to improve your testing experience and reduce test flake.

Use unique descriptions for hover-image and hover-text

When executing the hover-image and hover-text command, TestDriver may use the description to identify the image, especially if multiple images are visible. If multiple images on the screen match the description, TestDriver may not be able to determine which one to interact with. To improve accuracy, use specific and unique descriptions for images. TestDriver may not accurately locate matches in certain cases. This can lead to unexpected behavior when using the hover-image or hover-text command. For example, if you specify a description that’s too generic or similar to other images on the screen, TestDriver may not be able to identify the correct image to interact with. To improve accuracy, use specific and unique descriptions for images and text. When executing the hover-image and hover-text commands, TestDriver uses the provided description to identify the target image or text. If the description is too generic or matches multiple elements on the screen, TestDriver may not be able to determine which one to interact with, leading to unexpected behavior. To improve accuracy, always use specific and unique descriptions for both images and text.

Avoid using hover-text for single characters (ex: 1, >, |)

To improve accuracy of our model, we do not include single characters or symbols in the matching data. This means that hover-text may not work as expected for these cases. If you need to interact with single characters or symbols, consider using the match-image command with a screenshot of the target element instead.

Use <label>s to match empty text inputs.

To focus empty text inputs, prefer to hover-text on the label associated with the input. This should focus the input field. This is more reliable than trying to match the empty input itself, which may not have any visible text. You can always use match-image to match the input field if needed.

Provide strict criteria for assert

Assertions use the current state of the page to determine if the step passes or fails. assert is not aware of the past, so avoid writing “assert” steps that rely on previous state. Instead, use assert to check the current state of the page against strict criteria.

Reporting issues

If you encounter any issues while using TestDriver, please report them to us. You can do this by creating a new issue in the discord. We appreciate your feedback and will work to resolve any problems as quickly as possible.

Report an Issue

We’d love to hear from you!