You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Alexander Sorokin (JIRA)" <ji...@apache.org> on 2017/02/23 14:30:44 UTC
[jira] [Created] (CB-12501) Don't use XPath selectors in Camera
Appium tests for Android
Alexander Sorokin created CB-12501:
--------------------------------------
Summary: 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
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