Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-123361

Providing stable A11y identifier for reliable UI tests

    XMLWordPrintable

Details

    • Android, iOS/tvOS/watchOS

    Description

      Using Appium for UI testing of Qt Apps on iOS and Android can be difficult as only accessibility texts (such as Accessible.name and Accessible.description) can be used to identify elements. These texts are prone to change and often localized, leading to breaking UI test suites.

      There exists an API on iOS to set an unique identifer for this use case: https://developer.apple.com/documentation/uikit/uiaccessibilityidentification/1623132-accessibilityidentifier?language=objc

      Android does not explicitly provide an equivalent API but in native Apps the ressource ID can be used as a unique, stable identifier. This ID can be set programmatically on AccessibilityNodeInfo: https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#setViewIdResourceName(java.lang.String)

      We therefor propose adding the new value "Identifier" to the QAccessible::text() interface and using it to provide a unique ID.

      Attachments

        For Gerrit Dashboard: QTBUG-123361
        # Subject Branch Project Status CR V

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            jtrillma Jens Trillmann
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews