- Selectorless testing focuses on what the user sees rather than how the UI is implemented.
- Tests are resilient to changes like text updates, class renaming, or minor layout adjustments.
- By using natural language and AI vision, TestDriver simplifies test creation and maintenance.
What’s selectorless testing?
The following is an example of a TestDriver test.hover-text
based on its context and description. The agent will search for elements: in the following order.
text
- exact element to matchdescription
- a description of the element given the exact text isn’t found, or there are multiple matchesprompt
- a high level prompt used to regenerate the test if no match is found
What happens when “Sign Up” changes to “Register”?
If the button text changes to “Register,” TestDriver’s AI vision will still locate the button based on its context and description. You don’t need to update the test manually. TestDriver will then update the test to reflect the new UI by modifying thetext
field. Then, it will open a new pull request with the changes.
Need to add
--heal
flag during the run command to enable auto-healing of the
tests. Refer the Auto-Healing section
to know more.Why selectorless testing?
Traditional testing frameworks rely on selectors tightly coupled to the codebase. For example:When using legacy frameworks, if the class name changes, the test will break,
requiring updates to the test code!
Selectorless testing avoids this by focusing on the intent of the interaction
rather than the implementation details.