Visual Accessors for Web Testing
What is a Visual Accessor?
Visual Accessors are image based accessors which can be used to enhance your test scripts in situations where traditional code-based accessors will fail. AIQ will capture an image of the website and then crop the surrounding boundaries of the element that you are working on. During playback it takes the image and applies a feature based matching algorithm which creates a pattern from the image and uses that to locate the image on the webpage.
Using a Visual Accessors means that AIQ is not only looking at just the code elements in a page, the AI is also looking at the visual elements on the page.
Visual Accessors vs Visual Hints
Visual hints are images in test scripts that generally take the place of comments. They are not actual accessors. Only AIQ uses true Visual Accessors.
For example, AIQ can now locate a button and automatically understand the boundaries of the button, its location on the page as well as the visual element of the button to identify it going forward. This means that if in the future, the code-based accessors have changed, or are no longer present, the Visual Accessor used for the button will allow the test to run without failing because of the failure of the other accessors.
Visual Accessors in AIQ
The ability to use visual accessors has been added to the Web Testing IDE in AIQ 4.10.0. This functionality means that AIQ can now automatically collect images and used them as valid accessors.
These visual accessors allow you to capture images into your test scripts. Images will be linked to the script so that the script is aware of any images.
Previously, accessors for images was limited to the XY coordinates. That means that your scripts run the risk of being somewhat brittle if an image moved a little bit to the left or to the right. Visual accessors make your scripts more resilient and require less maintenance.
Visual accessors are similar to smart tags-based images, the result is a boundary that indicates where the image is located and not a specific HTML tag.