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 1.7.11 to 1.7.13

2

package.json
{
"name": "appium-uiauto",
"version": "1.7.11",
"version": "1.7.13",
"description": "appium uiauto ios driver",

@@ -5,0 +5,0 @@ "main": "lib/main.js",

@@ -6,13 +6,59 @@ /* globals $ */

$.extend($, {
system: function () { return UIATarget.localTarget().host(); }
system: function () { return $.target().host(); }
, target: function () { return UIATarget.localTarget(); }
, mainWindow: function () { return UIATarget.localTarget().frontMostApp().mainWindow(); }
, mainApp: function () { return UIATarget.localTarget().frontMostApp(); }
, keyboard: function () { return UIATarget.localTarget().frontMostApp().keyboard(); }
, bundleId: function () { return UIATarget.localTarget().frontMostApp().bundleID(); }
, mainWindow: function () { return $.mainApp().mainWindow(); }
, mainApp: function () {
var app = null;
if (!$.tryWaitForCondition(function() {
app = $.target().frontMostApp();
return app && app.isValid(); })) {
throw new Error("No valid frontmost app was found.");
}
return app;
}
, keyboard: function () {
var appKeyboard = null;
if (!$.tryWaitForCondition(function() {
appKeyboard = $.mainApp().keyboard();
return appKeyboard && appKeyboard.isValid(); })) {
throw new Error("Could not locate keyboard.");
}
return appKeyboard;
}
, bundleId: function () { return $.mainApp().bundleID(); }
// overriding existing delay
, delay: function (ms) { delaySec.call(this, ms/1000); }
, logTree: function () {$($.mainApp()).logTree();}
, debug: function (s) { if ($.isVerbose) UIALogger.logDebug(s); }
, tryWaitForCondition: function(condition, interval) {
if (typeof condition !== 'function') {
throw new Error("Must provide a callback returning a boolean.")
}
var i = interval || 20, t = 0;
var isMet = condition();
while (t < 3000 && !isMet) {
t += i;
$.delay(i);
isMet = condition();
}
return isMet;
}
});
})();

@@ -49,13 +49,2 @@ /* globals $, ERROR */

, _tryWaitKbHidden: function() {
var interval = 50, t = 0;
while(t < 3000 && !$.mainApp().keyboard().isNil()) {
t += interval;
$.delay(interval);
}
return $.mainApp().keyboard().isNil();
}
, _pressKeyToHideKeyboard: function (keyName) {

@@ -101,3 +90,3 @@ $.debug("Hiding keyboard with keyName " + keyName);

if(!$._tryWaitKbHidden()) {
if(!$.tryWaitForCondition(function(){ return $.mainApp().keyboard().isNil(); })) {
throw new Error("Failed to hide keyboard.");

@@ -104,0 +93,0 @@ }

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