Skip to main content

Visual Accessors for Web Testing

Use

What this article when web tests need visual matching becauseis a stableVisual DOM locator, accessibility locator, or text locator is not available.

Validation workflowAccessor?

  1. Try

    Visual stableAccessors DOM,are accessibility,image text, or attribute-based locatorsaccessors beforewhich addingcan abe visualused accessor.

  2. Captureto aenhance tightlyyour scopedtest scripts in situations where traditional code-based accessors will fail. AIQ will capture an image of the element or regionwebsite and avoidthen broadcrop screenshotsthe surrounding boundaries of the element that canyou matchare unrelatedworking UI.
  3. Replayon. 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 targetwebpage. browser

    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 viewportautomatically 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 reviewused resultsthem afteras UIvalid 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 themeto changes.

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.

Visual accessors for web testing compliments the visual accessors for mobile testing functionality that was introduced in AIQ 4.9. See Visual Accessors for Mobile Testing for more information.


Last updated: OctoberSeptember 19,29, 20262023

If you have any feedback on this topic, please contact us at documentation@appvance.ai