cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From filmaj <>
Subject [GitHub] cordova-plugin-contacts pull request #144: [Appium] Add support for iOS' XCU...
Date Thu, 15 Dec 2016 21:47:26 GMT
GitHub user filmaj opened a pull request:

    [Appium] Add support for iOS' XCUITest automation library

    Please review @alsorokin !
    ### Platforms affected
    ### What does this PR do?
    When running UI automation tests in iOS, if you are running Xcode 8 or newer (which you
must have to run tests on iOS 10), you _must_ leverage Apple's new UI automation framework,
XCUITest. The current tests are written assuming the older iOS UI automation framework, UIAutomation.

    These changes move the appium test code so it is compatible with both:
     - 9.3 and earlier iOS automation framework, UIAutomation
     - 10.0+ iOS automation framework, XCUITest
    The main changes include:
     - leverages finding elements in native iOS land using the name selector, which also happens
to be faster than XPath selectors. This was required as the test case for Unicode-based elements
with XPath-based selection did _not_ work under XCUITest.
     - Appium has a handy capability called "autoAcceptDialogs" which [by default we use](
This feature allowed us to not have to worry about automating dismissing the native permission
dialogs around certain native API device accesses (such as, in this plugin's case, contacts
or Address Book access). However, this capability is no longer supported under XCUITest. Thus,
the code changes included here also offer a transitionary method of explicitly automating
dismissing this dialog. It is robust enough to be able to work with both a functioning `autoAcceptDialogs`
capability, or not. Comments are included to give hints on when the functionality could be
simplified (once we move to iOS 10+ only).
    ### What testing has been done on this change?
    Tested and working on local Xcode 8.1 + Appium 1.6.3 environment, on the following simulators:
     - iOS 9.3 iPhone 6S Plus
     - iOS 10.0 iPhone 6S Plus
     - iOs 10.1 iPhone 6S Plus
    ### Checklist
    - [ ] [Reported an issue]( in the JIRA
    - [ ] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file
paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
    - [ ] Added automated test coverage as appropriate for this change.

You can merge this pull request into a Git repository by running:

    $ git pull xcuitest-support

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #144
commit 2de7bfea3fc49774b1472f7a2af9af0cbc3aca10
Author: filmaj <>
Date:   2016-12-15T21:12:01Z

    [Appium] Add forward-compatibility support for XCUITest automation in iOS. Is backwards-compatible
with UIAutomation-based test runs. Leverages finding elements in native iOS land using the
name selector, which also happens to be faster than XPath selectors.


If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message