Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

appium-uiauto

Package Overview
Dependencies
Maintainers
2
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

appium-uiauto - npm Package Compare versions

Comparing version 0.0.16 to 0.0.17

..jshintrc.un~

2

package.json
{
"name": "appium-uiauto",
"version": "0.0.16",
"version": "0.0.17",
"description": "appium uiauto ios driver",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -9,2 +9,12 @@ /* globals codes, $ */

UIAElement.prototype.getFirstWithPredicateWeighted = function (predicate) {
var elems = this.getElementsWithPredicateWeighted(predicate);
return au._returnFirstElem($(elems));
};
UIAElement.prototype.getAllWithPredicateWeighted = function (predicate) {
var elems = this.getElementsWithPredicateWeighted(predicate);
return au._returnElems($(elems));
};
UIAElement.prototype.getElementsWithPredicateWeighted = function (predicate) {
var target = UIATarget.localTarget();

@@ -24,2 +34,3 @@ target.pushTimeout(0);

var children = element.elements();
var allElements = [];
if (isNil(results)) {

@@ -40,3 +51,3 @@ results = element.textFields().withPredicate(search);

if (tmp.isVisible() === 1) {
return tmp;
allElements.push(result);
}

@@ -49,22 +60,17 @@ }

if (result.type() !== 'UIAElementNil' && result.isVisible() === 1) {
return result;
allElements.push(result);
}
}
return result;
return allElements;
};
var element = searchElements(this);
var elements = searchElements(this);
var newElements = [];
for (var i = 0; i < elements.length; i++) {
if (newElements.indexOf(elements[i]) === -1) {
newElements.push(elements[i]);
}
}
target.popTimeout();
if (element.type() === 'UIAElementNil') {
return {
status: 7,
value: {'message': 'An element could not be located on the page using the given search parameters.'}
};
}
return {
status: 0,
value: {ELEMENT: au.getId(element)}
};
return newElements;
};

@@ -357,2 +363,28 @@

, _getIdSearchPredicate: function (sel, exact) {
if (exact) {
return "name == '" + sel + "' || label == '" + sel + "' || value == '" +
sel + "'";
} else {
return "name contains[c] '" + sel + "' || label contains[c] '" + sel +
"' || value contains[c] '" + sel + "'";
}
}
, getElementById: function (sel) {
var exactPred = this._getIdSearchPredicate(sel, true);
var exact = this.mainApp().getFirstWithPredicateWeighted(exactPred);
if (exact && exact.status === 0) {
return exact;
} else {
var pred = this._getIdSearchPredicate(sel, false);
return this.mainApp().getFirstWithPredicateWeighted(pred);
}
}
, getElementsById: function (sel) {
var pred = this._getIdSearchPredicate(sel, false);
return this.mainApp().getAllWithPredicateWeighted(pred);
}
, _returnFirstElem: function (elems) {

@@ -359,0 +391,0 @@ if (elems.length > 0) {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc