appium-uiauto
Advanced tools
Comparing version 1.7.4 to 1.7.6
{ | ||
"name": "appium-uiauto", | ||
"version": "1.7.4", | ||
"version": "1.7.6", | ||
"description": "appium uiauto ios driver", | ||
@@ -5,0 +5,0 @@ "main": "lib/main.js", |
@@ -1,2 +0,2 @@ | ||
/* global autoAcceptAlerts*/ | ||
/* global autoAcceptAlerts, $ */ | ||
@@ -10,5 +10,5 @@ var alerts; | ||
if (alert.name() && alert.name().indexOf("attempting to open a pop-up") !== -1 && alert.buttons().length > 0) { | ||
alert.defaultButton().tap(); | ||
$.acceptAlert(); | ||
} else if (autoAcceptAlerts && alert.buttons().length > 0) { | ||
alert.defaultButton().tap(); | ||
$.acceptAlert(); | ||
} | ||
@@ -15,0 +15,0 @@ return true; |
@@ -129,4 +129,5 @@ /* globals $ */ | ||
var element = this; | ||
var found; | ||
$.each(weighting, function (idx, prop) { | ||
var found, prop; | ||
for (var i = 0; i < weighting.length; i++) { | ||
prop = weighting[i]; | ||
if (typeof element[prop] === 'function') { | ||
@@ -146,4 +147,4 @@ found = element[prop](); | ||
// match, keep looking. Otherwise exit the loop. | ||
return (!onlyFirst || results.length === 0); | ||
}); | ||
if (onlyFirst || results.length > 0) break; | ||
} | ||
@@ -153,5 +154,9 @@ // Only look through children if we have to. | ||
var child; | ||
for (var a = 0, len = this.elements().length; a < len; a++) { | ||
child = this.elements()[a]; | ||
if (!child.isNil()) { | ||
var children = this.elements(); | ||
for (var a = 0; a < children.length; a++) { | ||
child = children[a]; | ||
// make sure child isn't nil and isn't a webview | ||
// (we don't care about them for native and they tend to have tons | ||
// of children which make performance bad) | ||
if (!child.isNil() && child.type() !== "UIAWebView") { | ||
results = results.concat(child | ||
@@ -158,0 +163,0 @@ ._elementOrElementsWithPredicateWeighted(predicate, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13582282
3596