cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CB-12501) Don't use XPath selectors in Camera Appium tests for Android
Date Thu, 23 Feb 2017 14:53:44 GMT


ASF GitHub Bot commented on CB-12501:

GitHub user alsorokin opened a pull request:

    CB-12501 (Android) Appium tests don't use XPath selectors anymore

    ### Platforms affected
    ### What does this PR do?
    * Appium tests now use `elementByAndroidUIAutomator` selector instead of `elementByXPath`
    * Appium tests don't save a screenshot on failure anymore (who needs screenshots when
we have Sauce Labs videos?)
    * Other minor improvements
    ### What testing has been done on this change?
    Two tests runs on Sauce Labs: on Android 4.4 and on Android 5.1
    ### Checklist
    - [x] [Reported an issue]( in the JIRA
    - [x] 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.
    - [x] Added automated test coverage as appropriate for this change.

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

    $ git pull CB-12501

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 #255
commit 9d0d46490c9fc85d358ee02f6c18e3020c7ac73a
Author: Alexander Sorokin <>
Date:   2017-02-23T14:32:23Z

    CB-12501 (Android) Appium tests don't use XPath selectors anymore


> Don't use XPath selectors in Camera Appium tests for Android
> ------------------------------------------------------------
>                 Key: CB-12501
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Test
>          Components: Appium, Plugin Camera
>            Reporter: Alexander Sorokin
>            Assignee: Alexander Sorokin
>              Labels: triaged
> Currently Appium tests use XPath selectors, which are sloppy and buggy. For example,
we are forced to select certain elements quite a few times in a row to get the one that we
> {noformat}
> return driver
>     .waitForElementByXPath('//android.widget.TextView[@text="Gallery"]', 20000)
>     .elementByXPath('//android.widget.TextView[@text="Gallery"]') // multiple calls here
for an Android bug:
>     .elementByXPath('//android.widget.TextView[@text="Gallery"]') // on Windows + Android
emulator, element selection
>     .elementByXPath('//android.widget.TextView[@text="Gallery"]') // is completely wonky.
Unfortunately duplicating element()
>     .elementByXPath('//android.widget.TextView[@text="Gallery"]') // calls is the only
workaround identified thus far.
> {noformat}

This message was sent by Atlassian JIRA

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

View raw message