Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26973] iOS: Add accessibilityIdentifier

GitHub Issuen/a
TypeNew Feature
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2019-05-22T23:11:08.000+0000
Affected Version/sn/a
Fix Version/sRelease 8.1.0
ComponentsiOS
Labelsaccessibility, ios, testing
ReporterSergey Volkov
AssigneeVijay Singh
Created2019-04-02T12:39:46.000+0000
Updated2019-07-24T02:27:42.000+0000

Description

In UI testing one way of selecting element is by "Accessibility ID", e.g. in Appium: http://appium.io/docs/en/commands/element/find-elements/index.html#selector-strategies {quote} *Strategy* Accessibility ID *Description* Read a unique identifier for a UI element. For XCUITest it is the element's _+accessibility-id+_ attribute. For Android it is the element's _+content-desc+_ attribute. {quote} In Titanium SDK "content description" for Android views [composed from three other properties](https://github.com/appcelerator/titanium_mobile/blob/8_0_X/android/titanium/src/java/org/appcelerator/titanium/view/TiUIView.java#L2177): * accessibilityLabel * accessibilityValue * accessibilityHint On iOS property ["accessibilityIdentifier"](https://developer.apple.com/documentation/uikit/uiaccessibilityidentification/1623132-accessibilityidentifier?language=objc) is not used by Ti SDK. I suggest to compose "accessibilityIdentifier" value on iOS same way it is done on Android for "content description".

Attachments

FileDateSize
0001-feat-ios-compose-accessibility-identifier.patch2019-04-02T12:37:57.000+00004759

Comments

  1. Sergey Volkov 2019-04-02

    Add related to testing issues.
  2. Sergey Volkov 2019-04-22

    https://github.com/appcelerator/titanium_mobile/pull/10864
  3. Keerthi Mahalingam 2019-05-16

    FR Passed. waiting on Jenkins to merge
  4. Keerthi Mahalingam 2019-05-16

    PR merged.
  5. Keerthi Mahalingam 2019-05-22

    Verified the fix on sdk 8.1.0.v20190522031408.Works as expected.
    Test Environment:
       Name                        = Mac OS X
         Version                     = 10.13.6
         Architecture                = 64bit
       Node.js
         Node.js Version             = 8.9.1
         npm Version                 = 5.5.1
       Titanium CLI
         CLI Version                 = 5.1.1
       Titanium SDK
         SDK Version                 = 8.1.0.v20190522031408
       Cli =7.0.11
       Device =iPhone 6s iOS 12
       
  6. Ygor Lemos 2019-07-24

    Any chance of getting this back-ported to 7.5.X? We haven't moved all our apps to 8.X yet and we are implementing Appium which works flawlessly with accessibility ids instead of XPath which is very prone to errors...

JSON Source