mirror of
https://github.com/appium/appium.git
synced 2026-02-10 11:59:45 -06:00
-ios_uiautomation -> -ios uiautomation
This commit is contained in:
@@ -10,7 +10,7 @@ Appium supports a subset of the WebDriver locator strategies:
|
||||
|
||||
Appium additionally supports some of the [Mobile JSON Wire Protocol](https://code.google.com/p/selenium/source/browse/spec-draft.md?repo=mobile) locator strategies
|
||||
|
||||
* `-ios_uiautomation`: a string corresponding to a recursive element search using the UIAutomation library (iOS-only)
|
||||
* `-ios uiautomation`: a string corresponding to a recursive element search using the UIAutomation library (iOS-only)
|
||||
|
||||
###Tag name mapping
|
||||
|
||||
@@ -122,12 +122,12 @@ Python:
|
||||
driver.find_elements_by_tag_name('tableCell')[5].click()
|
||||
```
|
||||
|
||||
### Using the -ios_uiautomation locator strategy
|
||||
### Using the "-ios uiautomation" locator strategy
|
||||
|
||||
WD.js:
|
||||
|
||||
```js
|
||||
driver.element('-ios_uiautomation', '.elements()[1].cells()[2]').getAttribute('name');
|
||||
driver.element('-ios uiautomation', '.elements()[1].cells()[2]').getAttribute('name');
|
||||
```
|
||||
|
||||
# FindAndAct<a name="findandact"></a>
|
||||
|
||||
@@ -210,7 +210,7 @@ exports.checkValidLocStrat = function (strat, includeWeb, cb) {
|
||||
'class name'
|
||||
];
|
||||
var nativeStrats = [
|
||||
'-ios_uiautomation'
|
||||
'-ios uiautomation'
|
||||
];
|
||||
var webStrats = [
|
||||
'link text',
|
||||
@@ -223,7 +223,7 @@ exports.checkValidLocStrat = function (strat, includeWeb, cb) {
|
||||
var webDeprecations = {
|
||||
};
|
||||
var deprecations = {};
|
||||
|
||||
|
||||
if (includeWeb) {
|
||||
validStrats = validStrats.concat(webStrats);
|
||||
deprecations = webDeprecations;
|
||||
|
||||
@@ -52,7 +52,7 @@ iOSController.createGetElementCommand = function (strategy, selector, ctx, many)
|
||||
"PredicateWeighted(\"name contains[c] '", selector, "' || label contains[c] '",
|
||||
selector, "' || value contains[c] '", selector, "'\");"].join('');
|
||||
break;
|
||||
case "-ios_uiautomation":
|
||||
case "-ios uiautomation":
|
||||
command = ["au.getElement", ext, "ByUIAutomation('", selector, "'", ctx, ")"].join('');
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -89,7 +89,7 @@ IOS.prototype.init = function () {
|
||||
this.curWebCoords = null;
|
||||
this.onPageChangeCb = null;
|
||||
this.dontDeleteSimApps = false;
|
||||
this.supportedStrategies = ["name", "tag name", "xpath", "id", "-ios_uiautomation",
|
||||
this.supportedStrategies = ["name", "tag name", "xpath", "id", "-ios uiautomation",
|
||||
"class name", "accessibility_id"];
|
||||
this.localizableStrings = {};
|
||||
this.keepAppToRetainPrefs = false;
|
||||
|
||||
@@ -189,9 +189,9 @@ describe("apidemo - find elements -", function () {
|
||||
});
|
||||
});
|
||||
describe('invalid locator strategy', function () {
|
||||
it('should not accept -ios_uiautomation locator strategy', function (done) {
|
||||
it('should not accept -ios uiautomation locator strategy', function (done) {
|
||||
driver
|
||||
.elements('-ios_uiautomation', '.elements()').catch(function (err) {
|
||||
.elements('-ios uiautomation', '.elements()').catch(function (err) {
|
||||
throw JSON.stringify(err.cause.value);
|
||||
})
|
||||
.should.be.rejectedWith(/The requested resource could not be found/)
|
||||
|
||||
@@ -207,7 +207,7 @@ describe('uicatalog - find element -', function () {
|
||||
});
|
||||
|
||||
describe('FindElement(s)ByUIAutomation', function () {
|
||||
var byUIA = '-ios_uiautomation';
|
||||
var byUIA = '-ios uiautomation';
|
||||
|
||||
// Running sequentially cause parallel runs crash appium
|
||||
var filterDisplayed = function (els) {
|
||||
|
||||
Reference in New Issue
Block a user