cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
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

    [ https://issues.apache.org/jira/browse/CB-12501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15880586#comment-15880586
] 

ASF GitHub Bot commented on CB-12501:
-------------------------------------

GitHub user alsorokin opened a pull request:

    https://github.com/apache/cordova-plugin-camera/pull/255

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

    ### Platforms affected
    Android
    
    ### What does this PR do?
    https://issues.apache.org/jira/browse/CB-12501
    * 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](https://issues.apache.org/jira/browse/CB-12501) in the JIRA
database
    - [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 https://github.com/alsorokin/cordova-plugin-camera CB-12501

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

    https://github.com/apache/cordova-plugin-camera/pull/255.patch

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 <alexander.sorokin@akvelon.com>
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: https://issues.apache.org/jira/browse/CB-12501
>             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
need:
> {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
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message