Skip to main content

Fallback Accessors for Mobile Testing

The Fallback Accessoraccessors optionhelp wasmobile beentests addedcontinue forto playbackidentify incontrols when the Mobileprimary Testing IDE in the 4.9.5 release of AIQ.

You can enable the Fallback Accessors option so that AIQ keeps test running if an accessor fails or has changed, by automatically choosing other available accessors.

    If Fallback Accessors are enabled, AIQ will try one time for each accessor. If an accessor fails then it will scroll down and again try again each accessor one time and scroll until it reaches the end of the page or reaches maximum number scrolls.
    The scrolling logic will scroll up to ten times, depending on what it locates. If itlocator is notunstable. locating elements, it will stop before it reaches ten. If it is locating elements, it will continue until ten.

    If Fallback Accessors disabled, playback will function as it currently does. Tests may fail if an accessor fails or has changed.

    Enabling Fallback Accessors

    Use thethem Scripts menu in the Mobile Testing IDE to access the Fallback Accessors option. By default the option is not turned on.

    Playback Log

    The playback log will indicate whencarefully: a fallback accessorshould istarget the same intended element, not locatedmerely a similar visible control.

    When to use fallbacks

    • Mobile frameworks generate dynamic IDs or slightly different element trees.
    • Android and iOS expose different locator attributes for the same user action.
    • Responsive layouts or device sizes affect element position.
    • Self-healing requires a controlled alternative locator.

    Validation checklist

    1. Confirm the primary and fallback accessors identify the same business control.
    2. Test on the target device types, orientations, and OS versions.
    3. Prefer accessibility labels, stable resource IDs, and meaningful text over coordinates.
    4. Document why the fallback exists and when ait fallback accessor is located.

      About Visual Accessors and Fallback

      • An accessor is a string that when evaluate finds a browser object.

      Every accessor has a fallback attribute which mean they willshould be used as fallback if the global fallback option is enabled.

      reviewed.

      Image accessor are a byImg JS string in the AIQ engine.

      Target is the main accessor, the first element, and only visible in the script UI target is always fallback enabled.

      Other accessors are called fallback targets and could be used for fallback only if their fallback attribute is enabled.

      An accessor matches a browser object if, when evaluated it finds the same browser object.  


      Last updated: AprilOctober 11,6, 20242026

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