appium-uiauto
Advanced tools
Comparing version 1.7.2 to 1.7.4
@@ -22,3 +22,4 @@ // Generate a bootstrap for the UIAuto Instruments script containing | ||
instrumentsSock: opts.sock || '/tmp/instruments_sock', | ||
interKeyDelay: opts.interKeyDelay || null | ||
interKeyDelay: opts.interKeyDelay || null, | ||
justLoopInfinitely: opts.justLoopInfinitely | ||
}; | ||
@@ -25,0 +26,0 @@ return bootstrapEnv; |
{ | ||
"name": "appium-uiauto", | ||
"version": "1.7.2", | ||
"version": "1.7.4", | ||
"description": "appium uiauto ios driver", | ||
@@ -5,0 +5,0 @@ "main": "lib/main.js", |
@@ -17,5 +17,9 @@ /* globals env, alerts, commands */ | ||
env.init(dynamicEnv); | ||
alerts.configure(); | ||
commands.startProcessing(); | ||
if (env.justLoopInfinitely) { | ||
commands.loopInfinitely(); | ||
} else { | ||
alerts.configure(); | ||
commands.startProcessing(); | ||
} | ||
}; | ||
})(); |
@@ -20,3 +20,3 @@ // The message route is the following: | ||
var MORE_COMMAND = "#more"; | ||
var MESSAGE_TYPES = ['error','no data','regular','chunk','last chunk']; | ||
var MESSAGE_TYPES = ['error', 'no data', 'regular', 'chunk', 'last chunk']; | ||
@@ -34,3 +34,3 @@ commands = {}; | ||
this.messageType = function () { | ||
return this.noMore()? MESSAGE_TYPES.indexOf('last chunk') : | ||
return this.noMore() ? MESSAGE_TYPES.indexOf('last chunk') : | ||
MESSAGE_TYPES.indexOf('chunk'); | ||
@@ -64,3 +64,3 @@ }; | ||
$.debug('responding with:' + stringResult.substring(300)); | ||
if (stringResult.length < BIG_DATA_THRESHOLD){ | ||
if (stringResult.length < BIG_DATA_THRESHOLD) { | ||
// regular small results | ||
@@ -75,3 +75,3 @@ args.push(MESSAGE_TYPES.indexOf('regular') + ',' + stringResult); | ||
} else { | ||
args.push(MESSAGE_TYPES.indexOf('no data') + ','); | ||
args.push(MESSAGE_TYPES.indexOf('no data') + ','); | ||
} | ||
@@ -98,3 +98,3 @@ var cmd = env.nodePath + " " + args.join(" "); | ||
} | ||
var output = res.stdout.replace(/^(.*\n)*----- OUTPUT -----\r?\n/g,''); | ||
var output = res.stdout.replace(/^(.*\n)*----- OUTPUT -----\r?\n/g, ''); | ||
return JSON.parse(output).cmd; | ||
@@ -117,7 +117,7 @@ }; | ||
// converting UIAElementArray to mechanic wrap | ||
if (rawRes instanceof UIAElementArray){ | ||
if (rawRes instanceof UIAElementArray) { | ||
rawRes = $.smartWrap(rawRes); | ||
} | ||
// converting array of UIAElement to mechanic wrap | ||
if (Array.isArray(rawRes) && rawRes.length > 0){ | ||
if (Array.isArray(rawRes) && rawRes.length > 0) { | ||
try { | ||
@@ -160,3 +160,3 @@ rawRes = $.smartWrap(rawRes); | ||
function buildErrorResult (err) { | ||
function buildErrorResult(err) { | ||
$.error('Error during eval: ' + err.stack); | ||
@@ -212,4 +212,12 @@ if (err.isAppium) { | ||
}; | ||
commands.loopInfinitely = function () { | ||
$.debug("No command proxy active; just looping infinitely"); | ||
while (true) { | ||
$.debug("Waiting..."); | ||
$.system().performTaskWithPathArgumentsTimeout('/bin/sleep', [2]); | ||
} | ||
}; | ||
})(); | ||
@@ -11,4 +11,5 @@ var env; | ||
this.interKeyDelay = dynamicEnv.interKeyDelay; | ||
this.justLoopInfinitely = dynamicEnv.justLoopInfinitely; | ||
}; | ||
})(); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
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
13582039
172
3591
121