appium-android-driver 5.13.0 → 5.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/build/index.js +43 -40
- package/build/lib/android-helpers.d.ts +136 -0
- package/build/lib/android-helpers.d.ts.map +1 -0
- package/build/lib/android-helpers.js +760 -679
- package/build/lib/android-helpers.js.map +1 -1
- package/build/lib/bootstrap.d.ts +29 -0
- package/build/lib/bootstrap.d.ts.map +1 -0
- package/build/lib/bootstrap.js +192 -179
- package/build/lib/bootstrap.js.map +1 -1
- package/build/lib/commands/actions.d.ts +209 -0
- package/build/lib/commands/actions.d.ts.map +1 -0
- package/build/lib/commands/actions.js +327 -265
- package/build/lib/commands/actions.js.map +1 -1
- package/build/lib/commands/alert.d.ts +10 -0
- package/build/lib/commands/alert.d.ts.map +1 -0
- package/build/lib/commands/alert.js +12 -18
- package/build/lib/commands/alert.js.map +1 -1
- package/build/lib/commands/app-management.d.ts +314 -0
- package/build/lib/commands/app-management.d.ts.map +1 -0
- package/build/lib/commands/app-management.js +278 -110
- package/build/lib/commands/app-management.js.map +1 -1
- package/build/lib/commands/context.d.ts +94 -0
- package/build/lib/commands/context.d.ts.map +1 -0
- package/build/lib/commands/context.js +412 -260
- package/build/lib/commands/context.js.map +1 -1
- package/build/lib/commands/coverage.d.ts +5 -0
- package/build/lib/commands/coverage.d.ts.map +1 -0
- package/build/lib/commands/coverage.js +14 -17
- package/build/lib/commands/coverage.js.map +1 -1
- package/build/lib/commands/element.d.ts +36 -0
- package/build/lib/commands/element.d.ts.map +1 -0
- package/build/lib/commands/element.js +97 -127
- package/build/lib/commands/element.js.map +1 -1
- package/build/lib/commands/emu-console.d.ts +49 -0
- package/build/lib/commands/emu-console.d.ts.map +1 -0
- package/build/lib/commands/emu-console.js +36 -25
- package/build/lib/commands/emu-console.js.map +1 -1
- package/build/lib/commands/execute.d.ts +6 -0
- package/build/lib/commands/execute.d.ts.map +1 -0
- package/build/lib/commands/execute.js +68 -69
- package/build/lib/commands/execute.js.map +1 -1
- package/build/lib/commands/file-actions.d.ts +129 -0
- package/build/lib/commands/file-actions.d.ts.map +1 -0
- package/build/lib/commands/file-actions.js +321 -178
- package/build/lib/commands/file-actions.js.map +1 -1
- package/build/lib/commands/find.d.ts +13 -0
- package/build/lib/commands/find.d.ts.map +1 -0
- package/build/lib/commands/find.js +69 -51
- package/build/lib/commands/find.js.map +1 -1
- package/build/lib/commands/general.d.ts +133 -0
- package/build/lib/commands/general.d.ts.map +1 -0
- package/build/lib/commands/general.js +275 -216
- package/build/lib/commands/general.js.map +1 -1
- package/build/lib/commands/ime.d.ts +11 -0
- package/build/lib/commands/ime.d.ts.map +1 -0
- package/build/lib/commands/ime.js +27 -33
- package/build/lib/commands/ime.js.map +1 -1
- package/build/lib/commands/index.d.ts +3 -0
- package/build/lib/commands/index.d.ts.map +1 -0
- package/build/lib/commands/index.js +32 -35
- package/build/lib/commands/index.js.map +1 -1
- package/build/lib/commands/intent.d.ts +418 -0
- package/build/lib/commands/intent.d.ts.map +1 -0
- package/build/lib/commands/intent.js +281 -151
- package/build/lib/commands/intent.js.map +1 -1
- package/build/lib/commands/keyboard.d.ts +6 -0
- package/build/lib/commands/keyboard.d.ts.map +1 -0
- package/build/lib/commands/keyboard.js +6 -14
- package/build/lib/commands/keyboard.js.map +1 -1
- package/build/lib/commands/log.d.ts +45 -0
- package/build/lib/commands/log.d.ts.map +1 -0
- package/build/lib/commands/log.js +117 -103
- package/build/lib/commands/log.js.map +1 -1
- package/build/lib/commands/media-projection.d.ts +144 -0
- package/build/lib/commands/media-projection.d.ts.map +1 -0
- package/build/lib/commands/media-projection.js +228 -171
- package/build/lib/commands/media-projection.js.map +1 -1
- package/build/lib/commands/network.d.ts +139 -0
- package/build/lib/commands/network.d.ts.map +1 -0
- package/build/lib/commands/network.js +249 -181
- package/build/lib/commands/network.js.map +1 -1
- package/build/lib/commands/performance.d.ts +101 -0
- package/build/lib/commands/performance.d.ts.map +1 -0
- package/build/lib/commands/performance.js +390 -236
- package/build/lib/commands/performance.js.map +1 -1
- package/build/lib/commands/permissions.d.ts +93 -0
- package/build/lib/commands/permissions.d.ts.map +1 -0
- package/build/lib/commands/permissions.js +133 -93
- package/build/lib/commands/permissions.js.map +1 -1
- package/build/lib/commands/recordscreen.d.ts +194 -0
- package/build/lib/commands/recordscreen.d.ts.map +1 -0
- package/build/lib/commands/recordscreen.js +293 -224
- package/build/lib/commands/recordscreen.js.map +1 -1
- package/build/lib/commands/shell.d.ts +8 -0
- package/build/lib/commands/shell.d.ts.map +1 -0
- package/build/lib/commands/shell.js +38 -43
- package/build/lib/commands/shell.js.map +1 -1
- package/build/lib/commands/streamscreen.d.ts +104 -0
- package/build/lib/commands/streamscreen.d.ts.map +1 -0
- package/build/lib/commands/streamscreen.js +364 -305
- package/build/lib/commands/streamscreen.js.map +1 -1
- package/build/lib/commands/system-bars.d.ts +100 -0
- package/build/lib/commands/system-bars.d.ts.map +1 -0
- package/build/lib/commands/system-bars.js +148 -90
- package/build/lib/commands/system-bars.js.map +1 -1
- package/build/lib/commands/touch.d.ts +30 -0
- package/build/lib/commands/touch.d.ts.map +1 -0
- package/build/lib/commands/touch.js +311 -287
- package/build/lib/commands/touch.js.map +1 -1
- package/build/lib/desired-caps.d.ts +353 -0
- package/build/lib/desired-caps.d.ts.map +1 -0
- package/build/lib/desired-caps.js +291 -292
- package/build/lib/desired-caps.js.map +1 -1
- package/build/lib/driver.d.ts +430 -0
- package/build/lib/driver.d.ts.map +1 -0
- package/build/lib/driver.js +449 -384
- package/build/lib/driver.js.map +1 -1
- package/build/lib/logger.d.ts +3 -0
- package/build/lib/logger.d.ts.map +1 -0
- package/build/lib/logger.js +5 -11
- package/build/lib/logger.js.map +1 -1
- package/build/lib/method-map.d.ts +389 -0
- package/build/lib/method-map.d.ts.map +1 -0
- package/build/lib/method-map.js +220 -394
- package/build/lib/method-map.js.map +1 -1
- package/build/lib/stubs.d.ts +8 -0
- package/build/lib/stubs.d.ts.map +1 -0
- package/build/lib/stubs.js +5 -0
- package/build/lib/stubs.js.map +1 -0
- package/build/lib/uiautomator.d.ts +24 -0
- package/build/lib/uiautomator.d.ts.map +1 -0
- package/build/lib/uiautomator.js +86 -82
- package/build/lib/uiautomator.js.map +1 -1
- package/build/lib/unlock-helpers.d.ts +38 -0
- package/build/lib/unlock-helpers.d.ts.map +1 -0
- package/build/lib/unlock-helpers.js +228 -204
- package/build/lib/unlock-helpers.js.map +1 -1
- package/build/lib/utils.d.ts +11 -0
- package/build/lib/utils.d.ts.map +1 -0
- package/build/lib/utils.js +23 -18
- package/build/lib/utils.js.map +1 -1
- package/build/lib/webview-helpers.d.ts +223 -0
- package/build/lib/webview-helpers.d.ts.map +1 -0
- package/build/lib/webview-helpers.js +476 -298
- package/build/lib/webview-helpers.js.map +1 -1
- package/index.js +3 -1
- package/lib/android-helpers.js +2 -1
- package/lib/stubs.ts +8 -0
- package/lib/unlock-helpers.js +2 -2
- package/package.json +23 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.js","names":["_androidHelpers","_interopRequireDefault","require","_support","_path","_bluebird","_sharp","_teen_process","_utils","swipeStepsPerSec","dragStepsPerSec","commands","exports","helpers","extensions","keyevent","keycode","metastate","log","warn","pressKeyCode","bootstrap","sendAction","longPressKeyCode","getOrientation","params","naturalOrientation","opts","androidNaturalOrientation","orientation","toUpperCase","setOrientation","fakeFlick","xSpeed","ySpeed","fakeFlickElement","elementId","xoffset","yoffset","speed","swipe","startX","startY","endX","endY","duration","touchCount","elId","swipeOpts","steps","Math","round","util","hasValue","doSwipe","pinchClose","percent","pinchOpts","direction","pinchOpen","flick","element","xOffset","yOffset","drag","destElId","dragOpts","doDrag","lock","seconds","adb","isNaN","floatSeconds","parseFloat","B","delay","unlock","isLocked","isScreenLocked","androidHelpers","caps","openNotifications","setLocation","latitude","longitude","sendTelnetCommand","fingerprint","fingerprintId","isEmulator","errorAndThrow","mobileFingerprint","requireArgs","sendSMS","phoneNumber","message","mobileSendSms","gsmCall","action","mobileGsmCall","gsmSignal","signalStrengh","mobileGsmSignal","strength","gsmVoice","state","mobileGsmVoice","powerAC","mobilePowerAc","powerCapacity","batteryPercent","mobilePowerCapacity","networkSpeed","mobileNetworkSpeed","sensorSet","sensor","sensorType","value","getScreenshotDataWithAdbShell","localFile","tempDir","path","prefix","suffix","fs","exists","unlink","pngDir","androidScreenshotPath","png","posix","resolve","shell","fileSize","Error","pull","sharp","getScreenshotDataWithAdbExecOut","stdout","stderr","code","exec","executable","defaultArgs","encoding","isBuffer","length","toString","getScreenshot","apiLevel","getApiLevel","image","e","info","err","screenOrientation","getScreenOrientation","rotate","toBuffer","Object","assign","_default","default"],"sources":["../../../lib/commands/actions.js"],"sourcesContent":["import androidHelpers from '../android-helpers';\nimport { fs, util, tempDir} from '@appium/support';\nimport path from 'path';\nimport B from 'bluebird';\nimport sharp from 'sharp';\nimport { exec } from 'teen_process';\nimport { requireArgs } from '../utils';\n\nconst swipeStepsPerSec = 28;\nconst dragStepsPerSec = 40;\n\nconst commands = {};\nconst helpers = {};\nconst extensions = {};\n\ncommands.keyevent = async function keyevent (keycode, metastate = null) {\n // TODO deprecate keyevent; currently wd only implements keyevent\n this.log.warn('keyevent will be deprecated use pressKeyCode');\n return await this.pressKeyCode(keycode, metastate);\n};\n\ncommands.pressKeyCode = async function pressKeyCode (keycode, metastate = null) {\n return await this.bootstrap.sendAction('pressKeyCode', {keycode, metastate});\n};\n\ncommands.longPressKeyCode = async function longPressKeyCode (keycode, metastate = null) {\n return await this.bootstrap.sendAction('longPressKeyCode', {keycode, metastate});\n};\n\ncommands.getOrientation = async function getOrientation () {\n let params = {\n naturalOrientation: !!this.opts.androidNaturalOrientation,\n };\n let orientation = await this.bootstrap.sendAction('orientation', params);\n return orientation.toUpperCase();\n};\n\ncommands.setOrientation = async function setOrientation (orientation) {\n orientation = orientation.toUpperCase();\n let params = {\n orientation,\n naturalOrientation: !!this.opts.androidNaturalOrientation,\n };\n return await this.bootstrap.sendAction('orientation', params);\n};\n\ncommands.fakeFlick = async function fakeFlick (xSpeed, ySpeed) {\n return await this.bootstrap.sendAction('flick', {xSpeed, ySpeed});\n};\n\ncommands.fakeFlickElement = async function fakeFlickElement (elementId, xoffset, yoffset, speed) {\n let params = {xoffset, yoffset, speed, elementId};\n return await this.bootstrap.sendAction('element:flick', params);\n};\n\ncommands.swipe = async function swipe (startX, startY, endX, endY, duration, touchCount, elId) {\n if (startX === 'null') {\n startX = 0.5;\n }\n if (startY === 'null') {\n startY = 0.5;\n }\n let swipeOpts = {startX, startY, endX, endY,\n steps: Math.round(duration * swipeStepsPerSec)};\n // going the long way and checking for undefined and null since\n // we can't be assured `elId` is a string and not an int\n if (util.hasValue(elId)) {\n swipeOpts.elementId = elId;\n }\n return await this.doSwipe(swipeOpts);\n};\n\ncommands.doSwipe = async function doSwipe (swipeOpts) {\n if (util.hasValue(swipeOpts.elementId)) {\n return await this.bootstrap.sendAction('element:swipe', swipeOpts);\n } else {\n return await this.bootstrap.sendAction('swipe', swipeOpts);\n }\n};\n\ncommands.pinchClose = async function pinchClose (startX, startY, endX, endY, duration, percent, steps, elId) {\n let pinchOpts = {\n direction: 'in',\n elementId: elId,\n percent,\n steps\n };\n return await this.bootstrap.sendAction('element:pinch', pinchOpts);\n};\n\ncommands.pinchOpen = async function pinchOpen (startX, startY, endX, endY, duration, percent, steps, elId) {\n let pinchOpts = {direction: 'out', elementId: elId, percent, steps};\n return await this.bootstrap.sendAction('element:pinch', pinchOpts);\n};\n\ncommands.flick = async function flick (element, xSpeed, ySpeed, xOffset, yOffset, speed) {\n if (element) {\n await this.fakeFlickElement(element, xOffset, yOffset, speed);\n } else {\n await this.fakeFlick(xSpeed, ySpeed);\n }\n};\n\ncommands.drag = async function drag (startX, startY, endX, endY, duration, touchCount, elementId, destElId) {\n let dragOpts = {\n elementId, destElId, startX, startY, endX, endY,\n steps: Math.round(duration * dragStepsPerSec)\n };\n return await this.doDrag(dragOpts);\n\n};\n\ncommands.doDrag = async function doDrag (dragOpts) {\n if (util.hasValue(dragOpts.elementId)) {\n return await this.bootstrap.sendAction('element:drag', dragOpts);\n } else {\n return await this.bootstrap.sendAction('drag', dragOpts);\n }\n};\n\ncommands.lock = async function lock (seconds) {\n await this.adb.lock();\n if (isNaN(seconds)) {\n return;\n }\n\n const floatSeconds = parseFloat(seconds);\n if (floatSeconds <= 0) {\n return;\n }\n await B.delay(1000 * floatSeconds);\n await this.unlock();\n};\n\ncommands.isLocked = async function isLocked () {\n return await this.adb.isScreenLocked();\n};\n\ncommands.unlock = async function unlock () {\n return await androidHelpers.unlock(this, this.adb, this.caps);\n};\n\ncommands.openNotifications = async function openNotifications () {\n return await this.bootstrap.sendAction('openNotification');\n};\n\ncommands.setLocation = async function setLocation (latitude, longitude) {\n return await this.adb.sendTelnetCommand(`geo fix ${longitude} ${latitude}`);\n};\n\ncommands.fingerprint = async function fingerprint (fingerprintId) {\n if (!this.isEmulator()) {\n this.log.errorAndThrow('fingerprint method is only available for emulators');\n }\n await this.adb.fingerprint(fingerprintId);\n};\n\n/**\n * @typedef {Object} FingerprintOpts\n * @param {string|number} fingerprintId The value is the finger_id for the finger that\n * was \"scanned\". It is a unique integer that you assign for each virtual fingerprint.\n * When the app is running you can run this same command each time the\n * emulator prompts you for a fingerprint, you can run the adb command and pass it\n * the finger_id to simulate the fingerprint scan.\n */\n\n/**\n * Emulate fingerprint on Android Emulator.\n * Only works on API 23+\n *\n * @param {FingerprintOpts} opts\n */\ncommands.mobileFingerprint = async function mobileFingerprint(opts = {}) {\n const {fingerprintId} = requireArgs('fingerprintId', opts);\n await this.fingerprint(fingerprintId);\n};\n\ncommands.sendSMS = async function sendSMS (phoneNumber, message) {\n if (!this.isEmulator()) {\n this.log.errorAndThrow('sendSMS method is only available for emulators');\n }\n await this.adb.sendSMS(phoneNumber, message);\n};\n\n/**\n * @typedef {Object} SendSmsOptions\n * @property {string} phoneNumber The phone number to send SMS to\n * @property {string} message The message payload\n */\n\n/**\n * Emulate sending an SMS to the given phone number.\n * Only works on emulators.\n *\n * @param {SendSmsOptions} opts\n */\ncommands.mobileSendSms = async function mobileSendSms(opts = {}) {\n const {phoneNumber, message} = requireArgs(['phoneNumber', 'message'], opts);\n await this.sendSMS(phoneNumber, message);\n};\n\ncommands.gsmCall = async function gsmCall (phoneNumber, action) {\n if (!this.isEmulator()) {\n this.log.errorAndThrow('gsmCall method is only available for emulators');\n }\n await this.adb.gsmCall(phoneNumber, action);\n};\n\n/**\n * @typedef {Object} GsmCallOptions\n * @property {string} phoneNumber The phone number to call to\n * @property {call|accept|cancel|hold} action One of possible actions to take\n */\n\n/**\n * Emulate a GSM call to the given phone number.\n * Only works on emulators.\n *\n * @param {GsmCallOptions} opts\n */\ncommands.mobileGsmCall = async function mobileGsmCall(opts = {}) {\n const {phoneNumber, action} = requireArgs(['phoneNumber', 'action'], opts);\n await this.gsmCall(phoneNumber, action);\n};\n\ncommands.gsmSignal = async function gsmSignal (signalStrengh) {\n if (!this.isEmulator()) {\n this.log.errorAndThrow('gsmSignal method is only available for emulators');\n }\n await this.adb.gsmSignal(signalStrengh);\n};\n\n/**\n * @typedef {Object} GsmSignalOptions\n * @property {0|1|2|3|4} strength One of possible signal strength values, where 4 is the best signal.\n */\n\n/**\n * Emulate GSM signal strength change event.\n * Only works on emulators.\n *\n * @param {GsmSignalOptions} opts\n */\ncommands.mobileGsmSignal = async function mobileGsmSignal(opts = {}) {\n const {strength} = requireArgs('strength', opts);\n await this.gsmSignal(strength);\n};\n\ncommands.gsmVoice = async function gsmVoice (state) {\n if (!this.isEmulator()) {\n this.log.errorAndThrow('gsmVoice method is only available for emulators');\n }\n await this.adb.gsmVoice(state);\n};\n\n/**\n * @typedef {Object} GsmVoiceOptions\n * @property {on|off} state\n */\n\n/**\n * Emulate GSM voice state change event.\n * Only works on emulators.\n *\n * @param {GsmVoiceOptions} opts\n */\ncommands.mobileGsmVoice = async function mobileGsmVoice(opts = {}) {\n const {state} = requireArgs('state', opts);\n await this.gsmVoice(state);\n};\n\ncommands.powerAC = async function powerAC (state) {\n if (!this.isEmulator()) {\n this.log.errorAndThrow('powerAC method is only available for emulators');\n }\n await this.adb.powerAC(state);\n};\n\n/**\n * @typedef {Object} PowerAcOptions\n * @property {on|off} state\n */\n\n/**\n * Emulate AC power state change.\n * Only works on emulators.\n *\n * @param {GsmVoiceOptions} opts\n */\ncommands.mobilePowerAc = async function mobilePowerAc(opts = {}) {\n const {state} = requireArgs('state', opts);\n await this.powerAC(state);\n};\n\ncommands.powerCapacity = async function powerCapacity (batteryPercent) {\n if (!this.isEmulator()) {\n this.log.errorAndThrow('powerCapacity method is only available for emulators');\n }\n await this.adb.powerCapacity(batteryPercent);\n};\n\n/**\n * @typedef {Object} PowerCapacityOptions\n * @property {number} percent - Percentage value in range [0, 100]\n */\n\n/**\n * Emulate power capacity change.\n * Only works on emulators.\n *\n * @param {PowerCapacityOptions} opts\n */\ncommands.mobilePowerCapacity = async function mobilePowerCapacity(opts = {}) {\n const {percent} = requireArgs('percent', opts);\n await this.powerCapacity(percent);\n};\n\ncommands.networkSpeed = async function networkSpeed (networkSpeed) {\n if (!this.isEmulator()) {\n this.log.errorAndThrow('networkSpeed method is only available for emulators');\n }\n await this.adb.networkSpeed(networkSpeed);\n};\n\n/**\n * @typedef {Object} NetworkSpeedOptions\n * @property {gsm|scsd|gprs|edge|umts|hsdpa|lte|evdo|full} speed\n */\n\n/**\n * Emulate different network connection speed modes.\n * Only works on emulators.\n *\n * @param {NetworkSpeedOptions} opts\n */\ncommands.mobileNetworkSpeed = async function mobileNetworkSpeed(opts = {}) {\n const {speed} = requireArgs('speed', opts);\n await this.networkSpeed(speed);\n};\n\n/**\n * Emulate sensors values on the connected emulator.\n *\n * @typedef {Object} Sensor\n * @property {string} sensorType - sensor type declared in adb.SENSORS\n * @property {string} value - value to set to the sensor\n *\n * @param {Object} Sensor\n * @throws {Error} - If sensorType is not defined\n * @throws {Error} - If value for the se sor is not defined\n * @throws {Error} - If deviceType is not an emulator\n */\ncommands.sensorSet = async function sensorSet (sensor = {}) {\n const {sensorType, value} = sensor;\n if (!util.hasValue(sensorType)) {\n this.log.errorAndThrow(`'sensorType' argument is required`);\n }\n if (!util.hasValue(value)) {\n this.log.errorAndThrow(`'value' argument is required`);\n }\n if (!this.isEmulator()) {\n this.log.errorAndThrow('sensorSet method is only available for emulators');\n }\n await this.adb.sensorSet(sensorType, value);\n};\n\n/**\n * @param {ADB} adb\n * @param {Object} opts\n * @returns {Promise<sharp>}\n */\nhelpers.getScreenshotDataWithAdbShell = async function getScreenshotDataWithAdbShell (adb, opts) {\n const localFile = await tempDir.path({prefix: 'appium', suffix: '.png'});\n if (await fs.exists(localFile)) {\n await fs.unlink(localFile);\n }\n try {\n const pngDir = opts.androidScreenshotPath || '/data/local/tmp/';\n const png = path.posix.resolve(pngDir, 'screenshot.png');\n await adb.shell(['/system/bin/rm', `${png};`, '/system/bin/screencap', '-p', png]);\n if (!await adb.fileSize(png)) {\n throw new Error('The size of the taken screenshot equals to zero.');\n }\n await adb.pull(png, localFile);\n return sharp(localFile);\n } finally {\n if (await fs.exists(localFile)) {\n await fs.unlink(localFile);\n }\n }\n};\n\n/**\n * @param {ADB} adb\n * @returns {Promise<sharp>}\n */\nhelpers.getScreenshotDataWithAdbExecOut = async function getScreenshotDataWithAdbExecOut (adb) {\n const {stdout, stderr, code} = await exec(\n adb.executable.path,\n [...adb.executable.defaultArgs, 'exec-out', '/system/bin/screencap', '-p'],\n {encoding: 'binary', isBuffer: true}\n );\n // if there is an error, throw\n if (code || stderr.length) {\n throw new Error(`Screenshot returned error, code: '${code}', stderr: '${stderr.toString()}'`);\n }\n // if we don't get anything at all, throw\n if (!stdout.length) {\n throw new Error('Screenshot returned no data');\n }\n\n return sharp(stdout);\n};\n\ncommands.getScreenshot = async function getScreenshot () {\n const apiLevel = await this.adb.getApiLevel();\n let image = null;\n if (apiLevel > 20) {\n try {\n // This screenshoting approach is way faster, since it requires less external commands\n // to be executed. Unfortunately, exec-out option is only supported by newer Android/SDK versions (5.0 and later)\n image = await this.getScreenshotDataWithAdbExecOut(this.adb);\n } catch (e) {\n this.log.info(`Cannot get screenshot data with 'adb exec-out' because of '${e.message}'. ` +\n `Defaulting to 'adb shell' call`);\n }\n }\n if (!image) {\n try {\n image = await this.getScreenshotDataWithAdbShell(this.adb, this.opts);\n } catch (e) {\n const err = `Cannot get screenshot data because of '${e.message}'. ` +\n `Make sure the 'LayoutParams.FLAG_SECURE' is not set for ` +\n `the current view`;\n this.log.errorAndThrow(err);\n }\n }\n if (apiLevel < 23) {\n // Android bug 8433742 - rotate screenshot if screen is rotated\n let screenOrientation = await this.adb.getScreenOrientation();\n try {\n image = image.rotate(-90 * screenOrientation);\n } catch (err) {\n this.log.warn(`Could not rotate screenshot due to error: ${err}`);\n }\n }\n return (await image.toBuffer()).toString('base64');\n};\n\nObject.assign(extensions, commands, helpers);\nexport { commands, helpers };\nexport default extensions;\n"],"mappings":";;;;;;;;AAAA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,SAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,MAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AAEA,MAAMO,gBAAgB,GAAG,EAAE;AAC3B,MAAMC,eAAe,GAAG,EAAE;AAE1B,MAAMC,QAAQ,GAAG,CAAC,CAAC;AAACC,OAAA,CAAAD,QAAA,GAAAA,QAAA;AACpB,MAAME,OAAO,GAAG,CAAC,CAAC;AAACD,OAAA,CAAAC,OAAA,GAAAA,OAAA;AACnB,MAAMC,UAAU,GAAG,CAAC,CAAC;AAErBH,QAAQ,CAACI,QAAQ,GAAG,eAAeA,QAAQA,CAAEC,OAAO,EAAEC,SA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BAAoB,EAAE,CAAC;QAC9D,IAAI;YACF,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,iBAAiB,CAAC,CAAC;SAC/C;QAAC,OAAO,GAAG,EAAE;YACZ,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,6CAA6C,GAAG,EAAE,CAAC,CAAC;SACnE;KACF;IACD,OAAO,CAAC,MAAM,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACrD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AAE7C,kBAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export default extensions;
|
|
2
|
+
export namespace commands {
|
|
3
|
+
function getAlertText(): Promise<never>;
|
|
4
|
+
function setAlertText(): Promise<never>;
|
|
5
|
+
function postAcceptAlert(): Promise<never>;
|
|
6
|
+
function postDismissAlert(): Promise<never>;
|
|
7
|
+
}
|
|
8
|
+
export let helpers: {};
|
|
9
|
+
declare let extensions: {};
|
|
10
|
+
//# sourceMappingURL=alert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../lib/commands/alert.js"],"names":[],"mappings":";;IAKA,wCAEC;IAED,wCAEC;IAED,2CAEC;IAED,4CAEC;;AAhBkB,uBAAY;AAAE,2BAAe"}
|
|
@@ -1,29 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
require("source-map-support/register");
|
|
8
|
-
var _driver = require("appium/driver");
|
|
9
|
-
let commands = {},
|
|
10
|
-
helpers = {},
|
|
11
|
-
extensions = {};
|
|
12
|
-
exports.helpers = helpers;
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.helpers = exports.commands = void 0;
|
|
4
|
+
/* eslint-disable require-await */
|
|
5
|
+
const driver_1 = require("appium/driver");
|
|
6
|
+
let commands = {}, helpers = {}, extensions = {};
|
|
13
7
|
exports.commands = commands;
|
|
8
|
+
exports.helpers = helpers;
|
|
14
9
|
commands.getAlertText = async function getAlertText() {
|
|
15
|
-
|
|
10
|
+
throw new driver_1.errors.NotYetImplementedError();
|
|
16
11
|
};
|
|
17
12
|
commands.setAlertText = async function setAlertText() {
|
|
18
|
-
|
|
13
|
+
throw new driver_1.errors.NotYetImplementedError();
|
|
19
14
|
};
|
|
20
15
|
commands.postAcceptAlert = async function postAcceptAlert() {
|
|
21
|
-
|
|
16
|
+
throw new driver_1.errors.NotYetImplementedError();
|
|
22
17
|
};
|
|
23
18
|
commands.postDismissAlert = async function postDismissAlert() {
|
|
24
|
-
|
|
19
|
+
throw new driver_1.errors.NotYetImplementedError();
|
|
25
20
|
};
|
|
26
21
|
Object.assign(extensions, commands, helpers);
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfZHJpdmVyIiwicmVxdWlyZSIsImNvbW1hbmRzIiwiaGVscGVycyIsImV4dGVuc2lvbnMiLCJleHBvcnRzIiwiZ2V0QWxlcnRUZXh0IiwiZXJyb3JzIiwiTm90WWV0SW1wbGVtZW50ZWRFcnJvciIsInNldEFsZXJ0VGV4dCIsInBvc3RBY2NlcHRBbGVydCIsInBvc3REaXNtaXNzQWxlcnQiLCJPYmplY3QiLCJhc3NpZ24iLCJfZGVmYXVsdCIsImRlZmF1bHQiXSwic291cmNlcyI6WyIuLi8uLi8uLi9saWIvY29tbWFuZHMvYWxlcnQuanMiXSwic291cmNlc0NvbnRlbnQiOlsiLyogZXNsaW50LWRpc2FibGUgcmVxdWlyZS1hd2FpdCAqL1xuaW1wb3J0IHsgZXJyb3JzIH0gZnJvbSAnYXBwaXVtL2RyaXZl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FILFFBQUEsR0FBQUEsUUFBQTtBQUVqREEsUUFBUSxDQUFDSSxZQUFZLEdBQUcsZUFBZUEsWUFBWUEsQ0FBQSxFQUFJO0VBQ3JELE1BQU0sSUFBSUMsY0FBTSxDQUFDQyxzQkFBc0IsQ0FBQyxDQUFDO0FBQzNDLENBQUM7QUFFRE4sUUFBUSxDQUFDTyxZQUFZLEdBQUcsZUFBZUEsWUFBWUEsQ0FBQSxFQUFJO0VBQ3JELE1BQU0sSUFBSUYsY0FBTSxDQUFDQyxzQkFBc0IsQ0FBQyxDQUFDO0FBQzNDLENBQUM7QUFFRE4sUUFBUSxDQUFDUSxlQUFlLEdBQUcsZUFBZUEsZUFBZUEsQ0FBQSxFQUFJO0VBQzNELE1BQU0sSUFBSUgsY0FBTSxDQUFDQyxzQkFBc0IsQ0FBQyxDQUFDO0FBQzNDLENBQUM7QUFFRE4sUUFBUSxDQUFDUyxnQkFBZ0IsR0FBRyxlQUFlQSxnQkFBZ0JBLENBQUEsRUFBSTtFQUM3RCxNQUFNLElBQUlKLGNBQU0sQ0FBQ0Msc0JBQXNCLENBQUMsQ0FBQztBQUMzQyxDQUFDO0FBRURJLE1BQU0sQ0FBQ0MsTUFBTSxDQUFDVCxVQUFVLEVBQUVGLFFBQVEsRUFBRUMsT0FBTyxDQUFDO0FBQUMsSUFBQVcsUUFBQSxHQUU5QlYsVUFBVTtBQUFBQyxPQUFBLENBQUFVLE9BQUEsR0FBQUQsUUFBQSJ9
|
|
22
|
+
exports.default = extensions;
|
|
23
|
+
//# sourceMappingURL=alert.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.js","
|
|
1
|
+
{"version":3,"file":"alert.js","sourceRoot":"","sources":["../../../lib/commands/alert.js"],"names":[],"mappings":";;;AAAA,kCAAkC;AAClC,0CAAuC;AAEvC,IAAI,QAAQ,GAAG,EAAE,EAAE,OAAO,GAAG,EAAE,EAAE,UAAU,GAAG,EAAE,CAAC;AAmBxC,4BAAQ;AAAE,0BAAO;AAjB1B,QAAQ,CAAC,YAAY,GAAG,KAAK,UAAU,YAAY;IACjD,MAAM,IAAI,eAAM,CAAC,sBAAsB,EAAE,CAAC;AAC5C,CAAC,CAAC;AAEF,QAAQ,CAAC,YAAY,GAAG,KAAK,UAAU,YAAY;IACjD,MAAM,IAAI,eAAM,CAAC,sBAAsB,EAAE,CAAC;AAC5C,CAAC,CAAC;AAEF,QAAQ,CAAC,eAAe,GAAG,KAAK,UAAU,eAAe;IACvD,MAAM,IAAI,eAAM,CAAC,sBAAsB,EAAE,CAAC;AAC5C,CAAC,CAAC;AAEF,QAAQ,CAAC,gBAAgB,GAAG,KAAK,UAAU,gBAAgB;IACzD,MAAM,IAAI,eAAM,CAAC,sBAAsB,EAAE,CAAC;AAC5C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AAE7C,kBAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
export default commands;
|
|
2
|
+
export type MobileAppInstalledOptions = {
|
|
3
|
+
/**
|
|
4
|
+
* - Application package identifier. Must be always provided.
|
|
5
|
+
*/
|
|
6
|
+
appId: string;
|
|
7
|
+
};
|
|
8
|
+
export type MobileQueryAppStateOptions = {
|
|
9
|
+
/**
|
|
10
|
+
* - Application package identifier. Must be always provided.
|
|
11
|
+
*/
|
|
12
|
+
appId: string;
|
|
13
|
+
};
|
|
14
|
+
export type MobileActivateAppOptions = {
|
|
15
|
+
/**
|
|
16
|
+
* - Application package identifier. Must be always provided.
|
|
17
|
+
*/
|
|
18
|
+
appId: string;
|
|
19
|
+
};
|
|
20
|
+
export type UninstallOptions = {
|
|
21
|
+
/**
|
|
22
|
+
* [20000] - The count of milliseconds to wait until the
|
|
23
|
+
* app is uninstalled.
|
|
24
|
+
*/
|
|
25
|
+
timeout: number;
|
|
26
|
+
/**
|
|
27
|
+
* [false] - Set to true in order to keep the
|
|
28
|
+
* application data and cache folders after uninstall.
|
|
29
|
+
*/
|
|
30
|
+
keepData: boolean;
|
|
31
|
+
};
|
|
32
|
+
export type MobileRemoveAppOptions = {
|
|
33
|
+
/**
|
|
34
|
+
* - Application package identifier. Must be always provided.
|
|
35
|
+
*/
|
|
36
|
+
appId: string;
|
|
37
|
+
};
|
|
38
|
+
export type TerminateOptions = {
|
|
39
|
+
/**
|
|
40
|
+
* [500] - The count of milliseconds to wait until the
|
|
41
|
+
* app is terminated. The method will skip
|
|
42
|
+
* checking the app state check if the timeout
|
|
43
|
+
* was lower or equal to zero. Then, the return
|
|
44
|
+
* value will be true.
|
|
45
|
+
*/
|
|
46
|
+
timeout: number | string;
|
|
47
|
+
};
|
|
48
|
+
export type MobileTerminateAppOptions = {
|
|
49
|
+
/**
|
|
50
|
+
* - Application package identifier. Must be always provided.
|
|
51
|
+
*/
|
|
52
|
+
appId: string;
|
|
53
|
+
/**
|
|
54
|
+
* [500] - The count of milliseconds to wait until the
|
|
55
|
+
* app is terminated.
|
|
56
|
+
*/
|
|
57
|
+
timeout: number | string;
|
|
58
|
+
};
|
|
59
|
+
export type InstallOptions = {
|
|
60
|
+
/**
|
|
61
|
+
* [60000] - The count of milliseconds to wait until the
|
|
62
|
+
* app is installed.
|
|
63
|
+
*/
|
|
64
|
+
timeout: number;
|
|
65
|
+
/**
|
|
66
|
+
* [false] - Set to true in order to allow test
|
|
67
|
+
* packages installation.
|
|
68
|
+
*/
|
|
69
|
+
allowTestPackages: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* [false] - Set to true to install the app on sdcard
|
|
72
|
+
* instead of the device memory.
|
|
73
|
+
*/
|
|
74
|
+
useSdcard: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* [false] - Set to true in order to grant all the
|
|
77
|
+
* permissions requested in the application's manifest
|
|
78
|
+
* automatically after the installation is completed
|
|
79
|
+
* under Android 6+.
|
|
80
|
+
*/
|
|
81
|
+
grantPermissions: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* [true] - Set it to false if you don't want
|
|
84
|
+
* the application to be upgraded/reinstalled
|
|
85
|
+
* if it is already present on the device.
|
|
86
|
+
*/
|
|
87
|
+
replace: boolean;
|
|
88
|
+
};
|
|
89
|
+
export type MobileInstallAppOptions = {
|
|
90
|
+
/**
|
|
91
|
+
* - The local apk path or a remote url. Must be always provided.
|
|
92
|
+
*/
|
|
93
|
+
appPath: string;
|
|
94
|
+
/**
|
|
95
|
+
* [60000] - The count of milliseconds to wait until the
|
|
96
|
+
* app is installed.
|
|
97
|
+
*/
|
|
98
|
+
timeout: number;
|
|
99
|
+
/**
|
|
100
|
+
* [false] - Set to true in order to allow test
|
|
101
|
+
* packages installation.
|
|
102
|
+
*/
|
|
103
|
+
allowTestPackages: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* [false] - Set to true to install the app on sdcard
|
|
106
|
+
* instead of the device memory.
|
|
107
|
+
*/
|
|
108
|
+
useSdcard: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* [false] - Set to true in order to grant all the
|
|
111
|
+
* permissions requested in the application's manifest
|
|
112
|
+
* automatically after the installation is completed
|
|
113
|
+
* under Android 6+.
|
|
114
|
+
*/
|
|
115
|
+
grantPermissions: boolean;
|
|
116
|
+
/**
|
|
117
|
+
* [true] - Set it to false if you don't want
|
|
118
|
+
* the application to be upgraded/reinstalled
|
|
119
|
+
* if it is already present on the device.
|
|
120
|
+
*/
|
|
121
|
+
replace: boolean;
|
|
122
|
+
};
|
|
123
|
+
export type ClearAppOptions = {
|
|
124
|
+
/**
|
|
125
|
+
* The identifier of the application package to be cleared
|
|
126
|
+
*/
|
|
127
|
+
appId: string;
|
|
128
|
+
};
|
|
129
|
+
export namespace commands {
|
|
130
|
+
/**
|
|
131
|
+
* Verify whether an application is installed or not
|
|
132
|
+
*
|
|
133
|
+
* @param {string} appId - Application package identifier
|
|
134
|
+
* @returns {boolean} true if the app is installed
|
|
135
|
+
*/
|
|
136
|
+
function isAppInstalled(appId: string): boolean;
|
|
137
|
+
/**
|
|
138
|
+
* @typedef {Object} MobileAppInstalledOptions
|
|
139
|
+
* @property {string} appId - Application package identifier. Must be always provided.
|
|
140
|
+
*/
|
|
141
|
+
/**
|
|
142
|
+
* Verify whether an application is installed or not
|
|
143
|
+
*
|
|
144
|
+
* @param {MobileAppInstalledOptions} opts
|
|
145
|
+
* @returns {boolean} Same as in `isAppInstalled`
|
|
146
|
+
*/
|
|
147
|
+
function mobileIsAppInstalled(opts?: MobileAppInstalledOptions): boolean;
|
|
148
|
+
/**
|
|
149
|
+
* Queries the current state of the app.
|
|
150
|
+
*
|
|
151
|
+
* @param {string} appId - Application package identifier
|
|
152
|
+
* @returns {number} The corresponding constant, which describes
|
|
153
|
+
* the current application state:
|
|
154
|
+
* 0 - is the app is not installed
|
|
155
|
+
* 1 - if the app is installed, but is not running
|
|
156
|
+
* 3 - if the app is running in the background
|
|
157
|
+
* 4 - if the app is running in the foreground
|
|
158
|
+
*/
|
|
159
|
+
function queryAppState(appId: string): number;
|
|
160
|
+
/**
|
|
161
|
+
* @typedef {Object} MobileQueryAppStateOptions
|
|
162
|
+
* @property {string} appId - Application package identifier. Must be always provided.
|
|
163
|
+
*/
|
|
164
|
+
/**
|
|
165
|
+
* Queries the current state of the app.
|
|
166
|
+
*
|
|
167
|
+
* @param {MobileQueryAppStateOptions} opts
|
|
168
|
+
* @returns {number} Same as in `queryAppState`
|
|
169
|
+
*/
|
|
170
|
+
function mobileQueryAppState(opts?: MobileQueryAppStateOptions): number;
|
|
171
|
+
/**
|
|
172
|
+
* Activates the given application or launches it if necessary.
|
|
173
|
+
* The action literally simulates
|
|
174
|
+
* clicking the corresponding application icon on the dashboard.
|
|
175
|
+
*
|
|
176
|
+
* @param {string} appId - Application package identifier
|
|
177
|
+
* @throws {Error} If the app cannot be activated
|
|
178
|
+
*/
|
|
179
|
+
function activateApp(appId: string): Promise<void>;
|
|
180
|
+
/**
|
|
181
|
+
* @typedef {Object} MobileActivateAppOptions
|
|
182
|
+
* @property {string} appId - Application package identifier. Must be always provided.
|
|
183
|
+
*/
|
|
184
|
+
/**
|
|
185
|
+
* Activates the given application or launches it if necessary.
|
|
186
|
+
* The action literally simulates
|
|
187
|
+
* clicking the corresponding application icon on the dashboard.
|
|
188
|
+
*
|
|
189
|
+
* @param {MobileActivateAppOptions} opts
|
|
190
|
+
* @throws {Error} If the app cannot be activated
|
|
191
|
+
*/
|
|
192
|
+
function mobileActivateApp(opts?: MobileActivateAppOptions): Promise<void>;
|
|
193
|
+
/**
|
|
194
|
+
* @typedef {Object} UninstallOptions
|
|
195
|
+
* @property {number} timeout [20000] - The count of milliseconds to wait until the
|
|
196
|
+
* app is uninstalled.
|
|
197
|
+
* @property {boolean} keepData [false] - Set to true in order to keep the
|
|
198
|
+
* application data and cache folders after uninstall.
|
|
199
|
+
*/
|
|
200
|
+
/**
|
|
201
|
+
* Remove the corresponding application if is installed.
|
|
202
|
+
* The call is ignored if the app is not installed.
|
|
203
|
+
*
|
|
204
|
+
* @param {string} appId - Application package identifier
|
|
205
|
+
* @param {?UninstallOptions} options - The set of removal options
|
|
206
|
+
* @returns {boolean} True if the package was found on the device and
|
|
207
|
+
* successfully uninstalled.
|
|
208
|
+
*/
|
|
209
|
+
function removeApp(appId: string, options?: UninstallOptions | null): boolean;
|
|
210
|
+
/**
|
|
211
|
+
* @typedef {Object} MobileRemoveAppOptions
|
|
212
|
+
* @property {string} appId - Application package identifier. Must be always provided.
|
|
213
|
+
*/
|
|
214
|
+
/**
|
|
215
|
+
* Remove the corresponding application if is installed.
|
|
216
|
+
* The call is ignored if the app is not installed.
|
|
217
|
+
*
|
|
218
|
+
* @param {MobileRemoveAppOptions} opts
|
|
219
|
+
* @returns {boolean} Same as in `removeApp`
|
|
220
|
+
*/
|
|
221
|
+
function mobileRemoveApp(opts?: MobileRemoveAppOptions): boolean;
|
|
222
|
+
/**
|
|
223
|
+
* @typedef {Object} TerminateOptions
|
|
224
|
+
* @property {number|string} timeout [500] - The count of milliseconds to wait until the
|
|
225
|
+
* app is terminated. The method will skip
|
|
226
|
+
* checking the app state check if the timeout
|
|
227
|
+
* was lower or equal to zero. Then, the return
|
|
228
|
+
* value will be true.
|
|
229
|
+
*/
|
|
230
|
+
/**
|
|
231
|
+
* Terminates the app if it is running. If the given timeout was lower or equal to zero,
|
|
232
|
+
* it returns true after terminating the app without checking the app state.
|
|
233
|
+
*
|
|
234
|
+
* @param {string} appId - Application package identifier
|
|
235
|
+
* @param {?TerminateOptions} options - The set of application termination options
|
|
236
|
+
* @returns {boolean} True if the app has been successfully terminated.
|
|
237
|
+
* @throws {Error} if the app has not been terminated within the given timeout.
|
|
238
|
+
*/
|
|
239
|
+
function terminateApp(appId: string, options?: TerminateOptions | null): boolean;
|
|
240
|
+
/**
|
|
241
|
+
* @typedef {Object} MobileTerminateAppOptions
|
|
242
|
+
* @property {string} appId - Application package identifier. Must be always provided.
|
|
243
|
+
* @property {number|string} timeout [500] - The count of milliseconds to wait until the
|
|
244
|
+
* app is terminated.
|
|
245
|
+
*/
|
|
246
|
+
/**
|
|
247
|
+
* Terminates the app if it is running.
|
|
248
|
+
*
|
|
249
|
+
* @param {MobileTerminateAppOptions} opts
|
|
250
|
+
* @returns {boolean} Same as in `terminateApp`
|
|
251
|
+
* @throws {Error} if the app has not been terminated within the given timeout.
|
|
252
|
+
*/
|
|
253
|
+
function mobileTerminateApp(opts?: MobileTerminateAppOptions): boolean;
|
|
254
|
+
/**
|
|
255
|
+
* @typedef {Object} InstallOptions
|
|
256
|
+
* @property {number} timeout [60000] - The count of milliseconds to wait until the
|
|
257
|
+
* app is installed.
|
|
258
|
+
* @property {boolean} allowTestPackages [false] - Set to true in order to allow test
|
|
259
|
+
* packages installation.
|
|
260
|
+
* @property {boolean} useSdcard [false] - Set to true to install the app on sdcard
|
|
261
|
+
* instead of the device memory.
|
|
262
|
+
* @property {boolean} grantPermissions [false] - Set to true in order to grant all the
|
|
263
|
+
* permissions requested in the application's manifest
|
|
264
|
+
* automatically after the installation is completed
|
|
265
|
+
* under Android 6+.
|
|
266
|
+
* @property {boolean} replace [true] - Set it to false if you don't want
|
|
267
|
+
* the application to be upgraded/reinstalled
|
|
268
|
+
* if it is already present on the device.
|
|
269
|
+
*/
|
|
270
|
+
/**
|
|
271
|
+
* Installs the given application to the device under test
|
|
272
|
+
*
|
|
273
|
+
* @param {string} appPath - The local apk path or a remote url
|
|
274
|
+
* @param {?InstallOptions} options - The set of installation options
|
|
275
|
+
* @throws {Error} if the given apk does not exist or is not reachable
|
|
276
|
+
*/
|
|
277
|
+
function installApp(appPath: string, options?: InstallOptions | null): Promise<void>;
|
|
278
|
+
/**
|
|
279
|
+
* @typedef {Object} MobileInstallAppOptions
|
|
280
|
+
* @property {string} appPath - The local apk path or a remote url. Must be always provided.
|
|
281
|
+
* @property {number} timeout [60000] - The count of milliseconds to wait until the
|
|
282
|
+
* app is installed.
|
|
283
|
+
* @property {boolean} allowTestPackages [false] - Set to true in order to allow test
|
|
284
|
+
* packages installation.
|
|
285
|
+
* @property {boolean} useSdcard [false] - Set to true to install the app on sdcard
|
|
286
|
+
* instead of the device memory.
|
|
287
|
+
* @property {boolean} grantPermissions [false] - Set to true in order to grant all the
|
|
288
|
+
* permissions requested in the application's manifest
|
|
289
|
+
* automatically after the installation is completed
|
|
290
|
+
* under Android 6+.
|
|
291
|
+
* @property {boolean} replace [true] - Set it to false if you don't want
|
|
292
|
+
* the application to be upgraded/reinstalled
|
|
293
|
+
* if it is already present on the device.
|
|
294
|
+
*/
|
|
295
|
+
/**
|
|
296
|
+
* Installs the given application to the device under test
|
|
297
|
+
*
|
|
298
|
+
* @param {MobileInstallAppOptions} opts
|
|
299
|
+
* @throws {Error} if the given apk does not exist or is not reachable
|
|
300
|
+
*/
|
|
301
|
+
function mobileInstallApp(opts?: MobileInstallAppOptions): Promise<void>;
|
|
302
|
+
/**
|
|
303
|
+
* @typedef {Object} ClearAppOptions
|
|
304
|
+
* @property {!string} appId The identifier of the application package to be cleared
|
|
305
|
+
*/
|
|
306
|
+
/**
|
|
307
|
+
* Deletes all data associated with a package.
|
|
308
|
+
*
|
|
309
|
+
* @param {ClearAppOptions} opts
|
|
310
|
+
* @throws {Error} If cleaning of the app data fails
|
|
311
|
+
*/
|
|
312
|
+
function mobileClearApp(opts?: ClearAppOptions): Promise<void>;
|
|
313
|
+
}
|
|
314
|
+
//# sourceMappingURL=app-management.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-management.d.ts","sourceRoot":"","sources":["../../../lib/commands/app-management.js"],"names":[],"mappings":";;;;;WAwBc,MAAM;;;;;;WA4CN,MAAM;;;;;;WA0EN,MAAM;;;;;;;aAkBN,MAAM;;;;;cAEN,OAAO;;;;;;WAmBP,MAAM;;;;;;;;;;aAiBN,MAAM,GAAC,MAAM;;;;;;WA2Cb,MAAM;;;;;aACN,MAAM,GAAC,MAAM;;;;;;;aAkBb,MAAM;;;;;uBAEN,OAAO;;;;;eAEP,OAAO;;;;;;;sBAEP,OAAO;;;;;;aAIP,OAAO;;;;;;aAmBP,MAAM;;;;;aACN,MAAM;;;;;uBAEN,OAAO;;;;;eAEP,OAAO;;;;;;;sBAEP,OAAO;;;;;;aAIP,OAAO;;;;;;WAkBN,MAAM;;;IAlTrB;;;;;OAKG;IACH,gDAEC;IAED;;;OAGG;IAEH;;;;;OAKG;IACH,yEAGC;IAED;;;;;;;;;;OAUG;IACH,8CAeC;IAED;;;OAGG;IAEH;;;;;OAKG;IACH,wEAGC;IAED;;;;;;;OAOG;IACH,mDAgDC;IAED;;;OAGG;IAEH;;;;;;;OAOG;IACH,2EAGC;IAED;;;;;;OAMG;IAEH;;;;;;;;OAQG;IACH,8EAEC;IAED;;;OAGG;IAEH;;;;;;OAMG;IACH,iEAGC;IAED;;;;;;;OAOG;IAEH;;;;;;;;OAQG;IACH,iFAuBC;IAED;;;;;OAKG;IAEH;;;;;;OAMG;IACH,uEAGC;IAED;;;;;;;;;;;;;;;OAeG;IAEH;;;;;;OAMG;IACH,qFAGC;IAED;;;;;;;;;;;;;;;;OAgBG;IAEH;;;;;OAKG;IACH,yEAGC;IAED;;;OAGG;IAEH;;;;;OAKG;IACH,+DAMC"}
|