appium-uiautomator2-driver 2.22.1 → 2.23.0
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 +7 -0
- package/README.md +12 -0
- package/build/lib/commands/actions.js +1 -1
- package/build/lib/commands/actions.js.map +1 -1
- package/build/lib/commands/alert.js +1 -1
- package/build/lib/commands/alert.js.map +1 -1
- package/build/lib/commands/app-strings.js +1 -1
- package/build/lib/commands/app-strings.js.map +1 -1
- package/build/lib/commands/element.js +1 -1
- package/build/lib/commands/element.js.map +1 -1
- package/build/lib/commands/find.js +1 -1
- package/build/lib/commands/find.js.map +1 -1
- package/build/lib/commands/general.js +4 -1
- package/build/lib/commands/general.js.map +1 -1
- package/build/lib/commands/index.js +1 -1
- package/build/lib/commands/index.js.map +1 -1
- package/build/lib/commands/screenshot.js +1 -1
- package/build/lib/commands/screenshot.js.map +1 -1
- package/build/lib/commands/viewport.js +1 -1
- package/build/lib/commands/viewport.js.map +1 -1
- package/build/lib/css-converter.js +1 -1
- package/build/lib/css-converter.js.map +1 -1
- package/build/lib/desired-caps.js +1 -1
- package/build/lib/desired-caps.js.map +1 -1
- package/build/lib/driver.js +1 -1
- package/build/lib/driver.js.map +1 -1
- package/build/lib/helpers.js +1 -1
- package/build/lib/helpers.js.map +1 -1
- package/build/lib/uiautomator2.js +1 -1
- package/build/lib/uiautomator2.js.map +1 -1
- package/lib/commands/general.js +3 -0
- package/npm-shrinkwrap.json +278 -17
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uiautomator2.js","names":["_lodash","_interopRequireDefault","require","_driver","_asyncbox","_appiumUiautomator2Server","_support","_bluebird","_helpers","_axios","_path","REQD_PARAMS","SERVER_LAUNCH_TIMEOUT","SERVER_INSTALL_RETRIES","SERVICES_LAUNCH_TIMEOUT","SERVER_PACKAGE_ID","exports","SERVER_TEST_PACKAGE_ID","INSTRUMENTATION_TARGET","instrumentationLogger","logger","getLogger","UIA2Proxy","JWProxy","proxyCommand","url","method","body","didInstrumentationExit","errors","InvalidContextError","UiAutomator2Server","constructor","log","opts","req","util","hasValue","Error","disableSuppressAccessibilityService","proxyOpts","server","host","port","systemPort","keepAlive","readTimeout","timeout","jwproxy","proxyReqRes","bind","command","installServerApk","installTimeout","tmpRoot","tempDir","openDir","packageInfosMapper","appPath","appId","helpers","isWriteable","info","dstPath","path","resolve","basename","fs","copyFile","packagesInfo","B","all","map","apkPath","testApkPath","shouldUninstallServerPackages","shouldInstallServerPackages","isAppInstalled","adb","checkApkCert","signApp","appState","getApplicationInstallState","debug","APP_INSTALL_STATE","OLDER_VERSION_INSTALLED","NEWER_VERSION_INSTALLED","includes","NOT_INSTALLED","uninstallApk","err","warn","message","install","noIncremental","replace","timeoutCapName","rimraf","verifyServicesAvailability","isPmServiceAvailable","pmOutput","pmError","waitForCondition","shell","e","waitMs","intervalMs","error","line","split","startSession","caps","cleanupAutomationLeftovers","skipServerInstallation","serverVersion","uiautomator2ServerLaunchTimeout","timer","timing","Timer","start","retries","maxRetries","delayBetweenRetries","startInstrumentationProcess","errorAndThrow","delay","getDuration","asMilliSeconds","toFixed","capabilities","firstMatch","alwaysMatch","cmd","disableWindowAnimation","push","_","isBoolean","instrumentationProcess","createSubProcess","on","stdout","stderr","output","trim","code","deleteSession","strictCleanup","value","axios","data","activeSessionIds","id","filter","Boolean","length","JSON","stringify","pluralize","delete","forceStop","ignore","killProcessesByName","_default","default"],"sources":["../../lib/uiautomator2.js"],"sourcesContent":["import _ from 'lodash';\nimport { JWProxy, errors } from 'appium/driver';\nimport { waitForCondition } from 'asyncbox';\nimport {\n SERVER_APK_PATH as apkPath,\n TEST_APK_PATH as testApkPath,\n version as serverVersion\n} from 'appium-uiautomator2-server';\nimport {\n util, logger, tempDir, fs, timing\n} from 'appium/support';\nimport B from 'bluebird';\nimport helpers from './helpers';\nimport axios from 'axios';\nimport path from 'path';\n\nconst REQD_PARAMS = ['adb', 'tmpDir', 'host', 'systemPort', 'devicePort', 'disableWindowAnimation'];\nconst SERVER_LAUNCH_TIMEOUT = 30000;\nconst SERVER_INSTALL_RETRIES = 20;\nconst SERVICES_LAUNCH_TIMEOUT = 30000;\nconst SERVER_PACKAGE_ID = 'io.appium.uiautomator2.server';\nconst SERVER_TEST_PACKAGE_ID = `${SERVER_PACKAGE_ID}.test`;\nconst INSTRUMENTATION_TARGET = `${SERVER_TEST_PACKAGE_ID}/androidx.test.runner.AndroidJUnitRunner`;\nconst instrumentationLogger = logger.getLogger('Instrumentation');\n\nclass UIA2Proxy extends JWProxy {\n async proxyCommand (url, method, body = null) {\n if (this.didInstrumentationExit) {\n throw new errors.InvalidContextError(\n `'${method} ${url}' cannot be proxied to UiAutomator2 server because ` +\n 'the instrumentation process is not running (probably crashed). ' +\n 'Check the server log and/or the logcat output for more details');\n }\n return await super.proxyCommand(url, method, body);\n }\n}\n\nclass UiAutomator2Server {\n constructor (log, opts = {}) {\n for (let req of REQD_PARAMS) {\n if (!opts || !util.hasValue(opts[req])) {\n throw new Error(`Option '${req}' is required!`);\n }\n this[req] = opts[req];\n }\n this.log = log;\n this.disableSuppressAccessibilityService = opts.disableSuppressAccessibilityService;\n const proxyOpts = {\n log,\n server: this.host,\n port: this.systemPort,\n keepAlive: true,\n };\n if (opts.readTimeout && opts.readTimeout > 0) {\n proxyOpts.timeout = opts.readTimeout;\n }\n this.jwproxy = new UIA2Proxy(proxyOpts);\n this.proxyReqRes = this.jwproxy.proxyReqRes.bind(this.jwproxy);\n this.proxyCommand = this.jwproxy.command.bind(this.jwproxy);\n this.jwproxy.didInstrumentationExit = false;\n }\n\n /**\n * Installs the apks on to the device or emulator.\n *\n * @param {number} installTimeout - Installation timeout\n */\n async installServerApk (installTimeout = SERVER_INSTALL_RETRIES * 1000) {\n const tmpRoot = await tempDir.openDir();\n const packageInfosMapper = async ({appPath, appId}) => {\n if (await helpers.isWriteable(appPath)) {\n return { appPath, appId };\n }\n\n this.log.info(`Server package at '${appPath}' is not writeable. ` +\n `Will copy it into the temporary location at '${tmpRoot}' as a workaround. ` +\n `Consider making this file writeable manually in order to improve the performance of session startup.`);\n const dstPath = path.resolve(tmpRoot, path.basename(appPath));\n await fs.copyFile(appPath, dstPath);\n return {\n appPath: dstPath,\n appId,\n };\n };\n\n try {\n const packagesInfo = await B.all(B.map([\n {\n appPath: apkPath,\n appId: SERVER_PACKAGE_ID,\n }, {\n appPath: testApkPath,\n appId: SERVER_TEST_PACKAGE_ID,\n },\n ], packageInfosMapper));\n\n let shouldUninstallServerPackages = false;\n let shouldInstallServerPackages = false;\n for (const {appId, appPath} of packagesInfo) {\n if (appId === SERVER_TEST_PACKAGE_ID) {\n const isAppInstalled = await this.adb.isAppInstalled(appId);\n\n // There is no point in getting the state for test server,\n // since it does not contain version info\n if (!await this.adb.checkApkCert(appPath, appId)) {\n await helpers.signApp(this.adb, appPath);\n shouldUninstallServerPackages = shouldUninstallServerPackages || isAppInstalled;\n shouldInstallServerPackages = true;\n }\n\n if (!isAppInstalled) {\n shouldInstallServerPackages = true;\n }\n continue;\n }\n\n const appState = await this.adb.getApplicationInstallState(appPath, appId);\n this.log.debug(`${appId} installation state: ${appState}`);\n if (await this.adb.checkApkCert(appPath, appId)) {\n shouldUninstallServerPackages = shouldUninstallServerPackages || [\n this.adb.APP_INSTALL_STATE.OLDER_VERSION_INSTALLED,\n this.adb.APP_INSTALL_STATE.NEWER_VERSION_INSTALLED,\n ].includes(appState);\n } else {\n await helpers.signApp(this.adb, appPath);\n shouldUninstallServerPackages = shouldUninstallServerPackages || ![\n this.adb.APP_INSTALL_STATE.NOT_INSTALLED,\n ].includes(appState);\n }\n shouldInstallServerPackages = shouldInstallServerPackages || shouldUninstallServerPackages || [\n this.adb.APP_INSTALL_STATE.NOT_INSTALLED,\n ].includes(appState);\n }\n this.log.info(`Server packages are ${shouldInstallServerPackages ? '' : 'not '}going to be (re)installed`);\n if (shouldInstallServerPackages && shouldUninstallServerPackages) {\n this.log.info('Full packages reinstall is going to be performed');\n }\n for (const {appId, appPath} of packagesInfo) {\n if (shouldUninstallServerPackages) {\n try {\n await this.adb.uninstallApk(appId);\n } catch (err) {\n this.log.warn(`Error uninstalling '${appId}': ${err.message}`);\n }\n }\n if (shouldInstallServerPackages) {\n await this.adb.install(appPath, {\n noIncremental: true,\n replace: true,\n timeout: installTimeout,\n timeoutCapName: 'uiautomator2ServerInstallTimeout'\n });\n }\n }\n } finally {\n await fs.rimraf(tmpRoot);\n }\n\n await this.verifyServicesAvailability();\n }\n\n async verifyServicesAvailability () {\n this.log.debug(`Waiting up to ${SERVICES_LAUNCH_TIMEOUT}ms for services to be available`);\n let isPmServiceAvailable = false;\n let pmOutput = '';\n let pmError = null;\n try {\n await waitForCondition(async () => {\n if (!isPmServiceAvailable) {\n pmError = null;\n pmOutput = '';\n try {\n pmOutput = await this.adb.shell(['pm', 'list', 'instrumentation']);\n } catch (e) {\n pmError = e;\n }\n if (pmOutput.includes('Could not access the Package Manager')) {\n pmError = new Error(`Problem running Package Manager: ${pmOutput}`);\n pmOutput = ''; // remove output, so it is not printed below\n } else if (pmOutput.includes(INSTRUMENTATION_TARGET)) {\n pmOutput = ''; // remove output, so it is not printed below\n this.log.debug(`Instrumentation target '${INSTRUMENTATION_TARGET}' is available`);\n // eslint-disable-next-line require-atomic-updates\n isPmServiceAvailable = true;\n } else if (!pmError) {\n pmError = new Error('The instrumentation target is not listed by Package Manager');\n }\n }\n return isPmServiceAvailable;\n }, {\n waitMs: SERVICES_LAUNCH_TIMEOUT,\n intervalMs: 1000,\n });\n } catch (err) {\n this.log.error(`Unable to find instrumentation target '${INSTRUMENTATION_TARGET}': ${(pmError || {}).message}`);\n if (pmOutput) {\n this.log.debug('Available targets:');\n for (const line of pmOutput.split('\\n')) {\n this.log.debug(` ${line.replace('instrumentation:', '')}`);\n }\n }\n }\n }\n\n async startSession (caps) {\n await this.cleanupAutomationLeftovers();\n if (caps.skipServerInstallation) {\n this.log.info(`'skipServerInstallation' is set. Attempting to use UIAutomator2 server from the device`);\n } else {\n this.log.info(`Starting UIAutomator2 server ${serverVersion}`);\n this.log.info(`Using UIAutomator2 server from '${apkPath}' and test from '${testApkPath}'`);\n }\n\n const timeout = caps.uiautomator2ServerLaunchTimeout || SERVER_LAUNCH_TIMEOUT;\n const timer = new timing.Timer().start();\n let retries = 0;\n const maxRetries = 2;\n const delayBetweenRetries = 3000;\n while (retries < maxRetries) {\n this.log.info(`Waiting up to ${timeout}ms for UiAutomator2 to be online...`);\n this.jwproxy.didInstrumentationExit = false;\n await this.startInstrumentationProcess();\n if (!this.jwproxy.didInstrumentationExit) {\n try {\n await waitForCondition(async () => {\n try {\n await this.jwproxy.command('/status', 'GET');\n return true;\n } catch (err) {\n // short circuit to retry or fail fast\n return this.jwproxy.didInstrumentationExit;\n }\n }, {\n waitMs: timeout,\n intervalMs: 1000,\n });\n } catch (err) {\n this.log.errorAndThrow(`The instrumentation process cannot be initialized within ${timeout}ms timeout. `\n + 'Make sure the application under test does not crash and investigate the logcat output. '\n + `You could also try to increase the value of 'uiautomator2ServerLaunchTimeout' capability`);\n }\n }\n if (!this.jwproxy.didInstrumentationExit) {\n break;\n }\n\n retries++;\n if (retries >= maxRetries) {\n this.log.errorAndThrow('The instrumentation process cannot be initialized. '\n + 'Make sure the application under test does not crash and investigate the logcat output.');\n }\n this.log.warn(`The instrumentation process has been unexpectedly terminated. `\n + `Retrying UiAutomator2 startup (#${retries} of ${maxRetries - 1})`);\n await this.cleanupAutomationLeftovers(true);\n await B.delay(delayBetweenRetries);\n }\n\n this.log.debug(`The initialization of the instrumentation process took `\n + `${timer.getDuration().asMilliSeconds.toFixed(0)}ms`);\n await this.jwproxy.command('/session', 'POST', {\n capabilities: {\n firstMatch: [caps],\n alwaysMatch: {},\n }\n });\n }\n\n async startInstrumentationProcess () {\n const cmd = ['am', 'instrument', '-w'];\n if (this.disableWindowAnimation) {\n cmd.push('--no-window-animation');\n }\n if (_.isBoolean(this.disableSuppressAccessibilityService)) {\n cmd.push('-e', 'DISABLE_SUPPRESS_ACCESSIBILITY_SERVICES', this.disableSuppressAccessibilityService);\n }\n // Disable Google analytics to prevent possible fatal exception\n cmd.push('-e', 'disableAnalytics', true);\n cmd.push(INSTRUMENTATION_TARGET);\n const instrumentationProcess = this.adb.createSubProcess(['shell', ...cmd]);\n instrumentationProcess.on('output', (stdout, stderr) => {\n const output = _.trim(stdout || stderr);\n if (output) {\n instrumentationLogger.debug(output);\n }\n });\n instrumentationProcess.on('exit', (code) => {\n instrumentationLogger.debug(`The process has exited with code ${code}`);\n this.jwproxy.didInstrumentationExit = true;\n });\n await instrumentationProcess.start(0);\n }\n\n async deleteSession () {\n this.log.debug('Deleting UiAutomator2 server session');\n // rely on jwproxy's intelligence to know what we're talking about and\n // delete the current session\n try {\n await this.jwproxy.command('/', 'DELETE');\n } catch (err) {\n this.log.warn(`Did not get confirmation UiAutomator2 deleteSession worked; ` +\n `Error was: ${err}`);\n }\n }\n\n async cleanupAutomationLeftovers (strictCleanup = false) {\n this.log.debug(`Performing ${strictCleanup ? 'strict' : 'shallow'} cleanup of automation leftovers`);\n\n try {\n const {value} = (await axios({\n url: `http://${this.host}:${this.systemPort}/sessions`,\n timeout: 500,\n })).data;\n const activeSessionIds = value.map(({id}) => id).filter(Boolean);\n if (activeSessionIds.length) {\n this.log.debug(`The following obsolete sessions are still running: ${JSON.stringify(activeSessionIds)}`);\n this.log.debug(`Cleaning up ${util.pluralize('obsolete session', activeSessionIds.length, true)}`);\n await B.all(activeSessionIds\n .map((id) => axios.delete(`http://${this.host}:${this.systemPort}/session/${id}`))\n );\n // Let all sessions to be properly terminated before continuing\n await B.delay(1000);\n } else {\n this.log.debug('No obsolete sessions have been detected');\n }\n } catch (e) {\n this.log.debug(`No obsolete sessions have been detected (${e.message})`);\n }\n\n try {\n await this.adb.forceStop(SERVER_TEST_PACKAGE_ID);\n } catch (ignore) {}\n if (!strictCleanup) {\n return;\n }\n // https://github.com/appium/appium/issues/10749\n try {\n await this.adb.killProcessesByName('uiautomator');\n } catch (ignore) {}\n }\n}\n\nexport { UiAutomator2Server, INSTRUMENTATION_TARGET, SERVER_PACKAGE_ID, SERVER_TEST_PACKAGE_ID };\nexport default UiAutomator2Server;\n"],"mappings":";;;;;;;;AAAA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,yBAAA,GAAAH,OAAA;AAKA,IAAAI,QAAA,GAAAJ,OAAA;AAGA,IAAAK,SAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,QAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,MAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,KAAA,GAAAT,sBAAA,CAAAC,OAAA;AAEA,MAAMS,WAAW,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,wBAAwB,CAAC;AACnG,MAAMC,qBAAqB,GAAG,KAAK;AACnC,MAAMC,sBAAsB,GAAG,EAAE;AACjC,MAAMC,uBAAuB,GAAG,KAAK;AACrC,MAAMC,iBAAiB,GAAG,+BAA+B;AAACC,OAAA,CAAAD,iBAAA,GAAAA,iBAAA;AAC1D,MAAME,sBAAsB,GAAI,GAAEF,iBAAkB,OAAM;AAACC,OAAA,CAAAC,sBAAA,GAAAA,sBAAA;AAC3D,MAAMC,sBAAsB,GAAI,GAAED,sBAAuB,0CAAyC;AAACD,OAAA,CAAAE,sBAAA,GAAAA,sBAAA;AACnG,MAAMC,qBAAqB,GAAGC,eAAM,CAACC,SAAS,CAAC,iBAAiB,CAAC;AAEjE,MAAMC,SAAS,SAASC,eAAO,CAAC;EAC9B,MAAMC,YAAYA,CAAEC,GAAG,EAAEC,MAAM,EAAEC,IAAI,GAAG,IAAI,EAAE;IAC5C,IAAI,IAAI,CAACC,sBAAsB,EAAE;MAC/B,MAAM,IAAIC,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M,IAAI,CAACpE,GAAG,CAACmF,mBAAmB,CAAC,aAAa,CAAC;IACnD,CAAC,CAAC,OAAOD,MAAM,EAAE,CAAC;EACpB;AACF;AAAChJ,OAAA,CAAAe,kBAAA,GAAAA,kBAAA;AAAA,IAAAmI,QAAA,GAGcnI,kBAAkB;AAAAf,OAAA,CAAAmJ,OAAA,GAAAD,QAAA"}
|
|
1
|
+
{"version":3,"file":"uiautomator2.js","names":["_lodash","_interopRequireDefault","require","_driver","_asyncbox","_appiumUiautomator2Server","_support","_bluebird","_helpers","_axios","_path","REQD_PARAMS","SERVER_LAUNCH_TIMEOUT","SERVER_INSTALL_RETRIES","SERVICES_LAUNCH_TIMEOUT","SERVER_PACKAGE_ID","exports","SERVER_TEST_PACKAGE_ID","INSTRUMENTATION_TARGET","instrumentationLogger","logger","getLogger","UIA2Proxy","JWProxy","proxyCommand","url","method","body","didInstrumentationExit","errors","InvalidContextError","UiAutomator2Server","constructor","log","opts","req","util","hasValue","Error","disableSuppressAccessibilityService","proxyOpts","server","host","port","systemPort","keepAlive","readTimeout","timeout","jwproxy","proxyReqRes","bind","command","installServerApk","installTimeout","tmpRoot","tempDir","openDir","packageInfosMapper","appPath","appId","helpers","isWriteable","info","dstPath","path","resolve","basename","fs","copyFile","packagesInfo","B","all","map","apkPath","testApkPath","shouldUninstallServerPackages","shouldInstallServerPackages","isAppInstalled","adb","checkApkCert","signApp","appState","getApplicationInstallState","debug","APP_INSTALL_STATE","OLDER_VERSION_INSTALLED","NEWER_VERSION_INSTALLED","includes","NOT_INSTALLED","uninstallApk","err","warn","message","install","noIncremental","replace","timeoutCapName","rimraf","verifyServicesAvailability","isPmServiceAvailable","pmOutput","pmError","waitForCondition","shell","e","waitMs","intervalMs","error","line","split","startSession","caps","cleanupAutomationLeftovers","skipServerInstallation","serverVersion","uiautomator2ServerLaunchTimeout","timer","timing","Timer","start","retries","maxRetries","delayBetweenRetries","startInstrumentationProcess","errorAndThrow","delay","getDuration","asMilliSeconds","toFixed","capabilities","firstMatch","alwaysMatch","cmd","disableWindowAnimation","push","_","isBoolean","instrumentationProcess","createSubProcess","on","stdout","stderr","output","trim","code","deleteSession","strictCleanup","value","axios","data","activeSessionIds","id","filter","Boolean","length","JSON","stringify","pluralize","delete","forceStop","ignore","killProcessesByName","_default","default"],"sources":["../../lib/uiautomator2.js"],"sourcesContent":["import _ from 'lodash';\nimport { JWProxy, errors } from 'appium/driver';\nimport { waitForCondition } from 'asyncbox';\nimport {\n SERVER_APK_PATH as apkPath,\n TEST_APK_PATH as testApkPath,\n version as serverVersion\n} from 'appium-uiautomator2-server';\nimport {\n util, logger, tempDir, fs, timing\n} from 'appium/support';\nimport B from 'bluebird';\nimport helpers from './helpers';\nimport axios from 'axios';\nimport path from 'path';\n\nconst REQD_PARAMS = ['adb', 'tmpDir', 'host', 'systemPort', 'devicePort', 'disableWindowAnimation'];\nconst SERVER_LAUNCH_TIMEOUT = 30000;\nconst SERVER_INSTALL_RETRIES = 20;\nconst SERVICES_LAUNCH_TIMEOUT = 30000;\nconst SERVER_PACKAGE_ID = 'io.appium.uiautomator2.server';\nconst SERVER_TEST_PACKAGE_ID = `${SERVER_PACKAGE_ID}.test`;\nconst INSTRUMENTATION_TARGET = `${SERVER_TEST_PACKAGE_ID}/androidx.test.runner.AndroidJUnitRunner`;\nconst instrumentationLogger = logger.getLogger('Instrumentation');\n\nclass UIA2Proxy extends JWProxy {\n async proxyCommand (url, method, body = null) {\n if (this.didInstrumentationExit) {\n throw new errors.InvalidContextError(\n `'${method} ${url}' cannot be proxied to UiAutomator2 server because ` +\n 'the instrumentation process is not running (probably crashed). ' +\n 'Check the server log and/or the logcat output for more details');\n }\n return await super.proxyCommand(url, method, body);\n }\n}\n\nclass UiAutomator2Server {\n constructor (log, opts = {}) {\n for (let req of REQD_PARAMS) {\n if (!opts || !util.hasValue(opts[req])) {\n throw new Error(`Option '${req}' is required!`);\n }\n this[req] = opts[req];\n }\n this.log = log;\n this.disableSuppressAccessibilityService = opts.disableSuppressAccessibilityService;\n const proxyOpts = {\n log,\n server: this.host,\n port: this.systemPort,\n keepAlive: true,\n };\n if (opts.readTimeout && opts.readTimeout > 0) {\n proxyOpts.timeout = opts.readTimeout;\n }\n this.jwproxy = new UIA2Proxy(proxyOpts);\n this.proxyReqRes = this.jwproxy.proxyReqRes.bind(this.jwproxy);\n this.proxyCommand = this.jwproxy.command.bind(this.jwproxy);\n this.jwproxy.didInstrumentationExit = false;\n }\n\n /**\n * Installs the apks on to the device or emulator.\n *\n * @param {number} installTimeout - Installation timeout\n */\n async installServerApk (installTimeout = SERVER_INSTALL_RETRIES * 1000) {\n const tmpRoot = await tempDir.openDir();\n const packageInfosMapper = async ({appPath, appId}) => {\n if (await helpers.isWriteable(appPath)) {\n return { appPath, appId };\n }\n\n this.log.info(`Server package at '${appPath}' is not writeable. ` +\n `Will copy it into the temporary location at '${tmpRoot}' as a workaround. ` +\n `Consider making this file writeable manually in order to improve the performance of session startup.`);\n const dstPath = path.resolve(tmpRoot, path.basename(appPath));\n await fs.copyFile(appPath, dstPath);\n return {\n appPath: dstPath,\n appId,\n };\n };\n\n try {\n const packagesInfo = await B.all(B.map([\n {\n appPath: apkPath,\n appId: SERVER_PACKAGE_ID,\n }, {\n appPath: testApkPath,\n appId: SERVER_TEST_PACKAGE_ID,\n },\n ], packageInfosMapper));\n\n let shouldUninstallServerPackages = false;\n let shouldInstallServerPackages = false;\n for (const {appId, appPath} of packagesInfo) {\n if (appId === SERVER_TEST_PACKAGE_ID) {\n const isAppInstalled = await this.adb.isAppInstalled(appId);\n\n // There is no point in getting the state for test server,\n // since it does not contain version info\n if (!await this.adb.checkApkCert(appPath, appId)) {\n await helpers.signApp(this.adb, appPath);\n shouldUninstallServerPackages = shouldUninstallServerPackages || isAppInstalled;\n shouldInstallServerPackages = true;\n }\n\n if (!isAppInstalled) {\n shouldInstallServerPackages = true;\n }\n continue;\n }\n\n const appState = await this.adb.getApplicationInstallState(appPath, appId);\n this.log.debug(`${appId} installation state: ${appState}`);\n if (await this.adb.checkApkCert(appPath, appId)) {\n shouldUninstallServerPackages = shouldUninstallServerPackages || [\n this.adb.APP_INSTALL_STATE.OLDER_VERSION_INSTALLED,\n this.adb.APP_INSTALL_STATE.NEWER_VERSION_INSTALLED,\n ].includes(appState);\n } else {\n await helpers.signApp(this.adb, appPath);\n shouldUninstallServerPackages = shouldUninstallServerPackages || ![\n this.adb.APP_INSTALL_STATE.NOT_INSTALLED,\n ].includes(appState);\n }\n shouldInstallServerPackages = shouldInstallServerPackages || shouldUninstallServerPackages || [\n this.adb.APP_INSTALL_STATE.NOT_INSTALLED,\n ].includes(appState);\n }\n this.log.info(`Server packages are ${shouldInstallServerPackages ? '' : 'not '}going to be (re)installed`);\n if (shouldInstallServerPackages && shouldUninstallServerPackages) {\n this.log.info('Full packages reinstall is going to be performed');\n }\n for (const {appId, appPath} of packagesInfo) {\n if (shouldUninstallServerPackages) {\n try {\n await this.adb.uninstallApk(appId);\n } catch (err) {\n this.log.warn(`Error uninstalling '${appId}': ${err.message}`);\n }\n }\n if (shouldInstallServerPackages) {\n await this.adb.install(appPath, {\n noIncremental: true,\n replace: true,\n timeout: installTimeout,\n timeoutCapName: 'uiautomator2ServerInstallTimeout'\n });\n }\n }\n } finally {\n await fs.rimraf(tmpRoot);\n }\n\n await this.verifyServicesAvailability();\n }\n\n async verifyServicesAvailability () {\n this.log.debug(`Waiting up to ${SERVICES_LAUNCH_TIMEOUT}ms for services to be available`);\n let isPmServiceAvailable = false;\n let pmOutput = '';\n let pmError = null;\n try {\n await waitForCondition(async () => {\n if (!isPmServiceAvailable) {\n pmError = null;\n pmOutput = '';\n try {\n pmOutput = await this.adb.shell(['pm', 'list', 'instrumentation']);\n } catch (e) {\n pmError = e;\n }\n if (pmOutput.includes('Could not access the Package Manager')) {\n pmError = new Error(`Problem running Package Manager: ${pmOutput}`);\n pmOutput = ''; // remove output, so it is not printed below\n } else if (pmOutput.includes(INSTRUMENTATION_TARGET)) {\n pmOutput = ''; // remove output, so it is not printed below\n this.log.debug(`Instrumentation target '${INSTRUMENTATION_TARGET}' is available`);\n // eslint-disable-next-line require-atomic-updates\n isPmServiceAvailable = true;\n } else if (!pmError) {\n pmError = new Error('The instrumentation target is not listed by Package Manager');\n }\n }\n return isPmServiceAvailable;\n }, {\n waitMs: SERVICES_LAUNCH_TIMEOUT,\n intervalMs: 1000,\n });\n } catch (err) {\n this.log.error(`Unable to find instrumentation target '${INSTRUMENTATION_TARGET}': ${(pmError || {}).message}`);\n if (pmOutput) {\n this.log.debug('Available targets:');\n for (const line of pmOutput.split('\\n')) {\n this.log.debug(` ${line.replace('instrumentation:', '')}`);\n }\n }\n }\n }\n\n async startSession (caps) {\n await this.cleanupAutomationLeftovers();\n if (caps.skipServerInstallation) {\n this.log.info(`'skipServerInstallation' is set. Attempting to use UIAutomator2 server from the device`);\n } else {\n this.log.info(`Starting UIAutomator2 server ${serverVersion}`);\n this.log.info(`Using UIAutomator2 server from '${apkPath}' and test from '${testApkPath}'`);\n }\n\n const timeout = caps.uiautomator2ServerLaunchTimeout || SERVER_LAUNCH_TIMEOUT;\n const timer = new timing.Timer().start();\n let retries = 0;\n const maxRetries = 2;\n const delayBetweenRetries = 3000;\n while (retries < maxRetries) {\n this.log.info(`Waiting up to ${timeout}ms for UiAutomator2 to be online...`);\n this.jwproxy.didInstrumentationExit = false;\n await this.startInstrumentationProcess();\n if (!this.jwproxy.didInstrumentationExit) {\n try {\n await waitForCondition(async () => {\n try {\n await this.jwproxy.command('/status', 'GET');\n return true;\n } catch (err) {\n // short circuit to retry or fail fast\n return this.jwproxy.didInstrumentationExit;\n }\n }, {\n waitMs: timeout,\n intervalMs: 1000,\n });\n } catch (err) {\n this.log.errorAndThrow(`The instrumentation process cannot be initialized within ${timeout}ms timeout. `\n + 'Make sure the application under test does not crash and investigate the logcat output. '\n + `You could also try to increase the value of 'uiautomator2ServerLaunchTimeout' capability`);\n }\n }\n if (!this.jwproxy.didInstrumentationExit) {\n break;\n }\n\n retries++;\n if (retries >= maxRetries) {\n this.log.errorAndThrow('The instrumentation process cannot be initialized. '\n + 'Make sure the application under test does not crash and investigate the logcat output.');\n }\n this.log.warn(`The instrumentation process has been unexpectedly terminated. `\n + `Retrying UiAutomator2 startup (#${retries} of ${maxRetries - 1})`);\n await this.cleanupAutomationLeftovers(true);\n await B.delay(delayBetweenRetries);\n }\n\n this.log.debug(`The initialization of the instrumentation process took `\n + `${timer.getDuration().asMilliSeconds.toFixed(0)}ms`);\n await this.jwproxy.command('/session', 'POST', {\n capabilities: {\n firstMatch: [caps],\n alwaysMatch: {},\n }\n });\n }\n\n async startInstrumentationProcess () {\n const cmd = ['am', 'instrument', '-w'];\n if (this.disableWindowAnimation) {\n cmd.push('--no-window-animation');\n }\n if (_.isBoolean(this.disableSuppressAccessibilityService)) {\n cmd.push('-e', 'DISABLE_SUPPRESS_ACCESSIBILITY_SERVICES', this.disableSuppressAccessibilityService);\n }\n // Disable Google analytics to prevent possible fatal exception\n cmd.push('-e', 'disableAnalytics', true);\n cmd.push(INSTRUMENTATION_TARGET);\n const instrumentationProcess = this.adb.createSubProcess(['shell', ...cmd]);\n instrumentationProcess.on('output', (stdout, stderr) => {\n const output = _.trim(stdout || stderr);\n if (output) {\n instrumentationLogger.debug(output);\n }\n });\n instrumentationProcess.on('exit', (code) => {\n instrumentationLogger.debug(`The process has exited with code ${code}`);\n this.jwproxy.didInstrumentationExit = true;\n });\n await instrumentationProcess.start(0);\n }\n\n async deleteSession () {\n this.log.debug('Deleting UiAutomator2 server session');\n // rely on jwproxy's intelligence to know what we're talking about and\n // delete the current session\n try {\n await this.jwproxy.command('/', 'DELETE');\n } catch (err) {\n this.log.warn(`Did not get confirmation UiAutomator2 deleteSession worked; ` +\n `Error was: ${err}`);\n }\n }\n\n async cleanupAutomationLeftovers (strictCleanup = false) {\n this.log.debug(`Performing ${strictCleanup ? 'strict' : 'shallow'} cleanup of automation leftovers`);\n\n try {\n const {value} = (await axios({\n url: `http://${this.host}:${this.systemPort}/sessions`,\n timeout: 500,\n })).data;\n const activeSessionIds = value.map(({id}) => id).filter(Boolean);\n if (activeSessionIds.length) {\n this.log.debug(`The following obsolete sessions are still running: ${JSON.stringify(activeSessionIds)}`);\n this.log.debug(`Cleaning up ${util.pluralize('obsolete session', activeSessionIds.length, true)}`);\n await B.all(activeSessionIds\n .map((id) => axios.delete(`http://${this.host}:${this.systemPort}/session/${id}`))\n );\n // Let all sessions to be properly terminated before continuing\n await B.delay(1000);\n } else {\n this.log.debug('No obsolete sessions have been detected');\n }\n } catch (e) {\n this.log.debug(`No obsolete sessions have been detected (${e.message})`);\n }\n\n try {\n await this.adb.forceStop(SERVER_TEST_PACKAGE_ID);\n } catch (ignore) {}\n if (!strictCleanup) {\n return;\n }\n // https://github.com/appium/appium/issues/10749\n try {\n await this.adb.killProcessesByName('uiautomator');\n } catch (ignore) {}\n }\n}\n\nexport { UiAutomator2Server, INSTRUMENTATION_TARGET, SERVER_PACKAGE_ID, SERVER_TEST_PACKAGE_ID };\nexport default UiAutomator2Server;\n"],"mappings":";;;;;;;;AAAA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,yBAAA,GAAAH,OAAA;AAKA,IAAAI,QAAA,GAAAJ,OAAA;AAGA,IAAAK,SAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,QAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,MAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,KAAA,GAAAT,sBAAA,CAAAC,OAAA;AAEA,MAAMS,WAAW,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,wBAAwB,CAAC;AACnG,MAAMC,qBAAqB,GAAG,KAAK;AACnC,MAAMC,sBAAsB,GAAG,EAAE;AACjC,MAAMC,uBAAuB,GAAG,KAAK;AAC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,CAAE,UAAS,IAAI,CAACpH,IAAK,IAAG,IAAI,CAACE,UAAW,YAAW2G,EAAG,EAAC,CAAC,CACnF,CAAC;QAED,MAAMjF,iBAAC,CAACuD,KAAK,CAAC,IAAI,CAAC;MACrB,CAAC,MAAM;QACL,IAAI,CAAC5F,GAAG,CAACkD,KAAK,CAAC,yCAAyC,CAAC;MAC3D;IACF,CAAC,CAAC,OAAOqB,CAAC,EAAE;MACV,IAAI,CAACvE,GAAG,CAACkD,KAAK,CAAE,4CAA2CqB,CAAC,CAACZ,OAAQ,GAAE,CAAC;IAC1E;IAEA,IAAI;MACF,MAAM,IAAI,CAACd,GAAG,CAACiF,SAAS,CAAC9I,sBAAsB,CAAC;IAClD,CAAC,CAAC,OAAO+I,MAAM,EAAE,CAAC;IAClB,IAAI,CAACd,aAAa,EAAE;MAClB;IACF;IAEA,IAAI;MACF,MAAM,IAAI,CAACpE,GAAG,CAACmF,mBAAmB,CAAC,aAAa,CAAC;IACnD,CAAC,CAAC,OAAOD,MAAM,EAAE,CAAC;EACpB;AACF;AAAChJ,OAAA,CAAAe,kBAAA,GAAAA,kBAAA;AAAA,IAAAmI,QAAA,GAGcnI,kBAAkB;AAAAf,OAAA,CAAAmJ,OAAA,GAAAD,QAAA"}
|
package/lib/commands/general.js
CHANGED
|
@@ -96,6 +96,7 @@ extensions.executeMobile = async function (mobileCommand, opts = {}) {
|
|
|
96
96
|
stopScreenStreaming: 'mobileStopScreenStreaming',
|
|
97
97
|
|
|
98
98
|
getNotifications: 'mobileGetNotifications',
|
|
99
|
+
openNotifications: 'openNotifications',
|
|
99
100
|
|
|
100
101
|
listSms: 'mobileListSms',
|
|
101
102
|
|
|
@@ -141,6 +142,8 @@ extensions.executeMobile = async function (mobileCommand, opts = {}) {
|
|
|
141
142
|
|
|
142
143
|
getConnectivity: 'mobileGetConnectivity',
|
|
143
144
|
setConnectivity: 'mobileSetConnectivity',
|
|
145
|
+
toggleGps: 'toggleLocationServices',
|
|
146
|
+
isGpsEnables: 'isLocationServicesEnabled',
|
|
144
147
|
|
|
145
148
|
hideKeyboard: 'mobileHideKeyboard',
|
|
146
149
|
isKeyboardShown: 'isKeyboardShown',
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "appium-uiautomator2-driver",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.23.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "appium-uiautomator2-driver",
|
|
9
|
-
"version": "2.
|
|
9
|
+
"version": "2.23.0",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@babel/runtime": "^7.0.0",
|
|
13
13
|
"appium-adb": "^9.11.0",
|
|
14
|
-
"appium-android-driver": "^5.11.
|
|
14
|
+
"appium-android-driver": "^5.11.1",
|
|
15
15
|
"appium-chromedriver": "^5.3.1",
|
|
16
16
|
"appium-uiautomator2-server": "^5.7.2",
|
|
17
17
|
"asyncbox": "^2.3.1",
|
|
@@ -420,7 +420,7 @@
|
|
|
420
420
|
}
|
|
421
421
|
},
|
|
422
422
|
"node_modules/@babel/runtime": {
|
|
423
|
-
"version": "7.21.
|
|
423
|
+
"version": "7.21.5",
|
|
424
424
|
"license": "MIT",
|
|
425
425
|
"dependencies": {
|
|
426
426
|
"regenerator-runtime": "^0.13.11"
|
|
@@ -1035,7 +1035,7 @@
|
|
|
1035
1035
|
}
|
|
1036
1036
|
},
|
|
1037
1037
|
"node_modules/@types/node": {
|
|
1038
|
-
"version": "18.16.
|
|
1038
|
+
"version": "18.16.3",
|
|
1039
1039
|
"license": "MIT"
|
|
1040
1040
|
},
|
|
1041
1041
|
"node_modules/@types/normalize-package-data": {
|
|
@@ -1248,7 +1248,7 @@
|
|
|
1248
1248
|
"license": "MIT"
|
|
1249
1249
|
},
|
|
1250
1250
|
"node_modules/appium-adb": {
|
|
1251
|
-
"version": "9.11.
|
|
1251
|
+
"version": "9.11.2",
|
|
1252
1252
|
"license": "Apache-2.0",
|
|
1253
1253
|
"dependencies": {
|
|
1254
1254
|
"@appium/support": "^3.0.0",
|
|
@@ -1278,17 +1278,16 @@
|
|
|
1278
1278
|
}
|
|
1279
1279
|
},
|
|
1280
1280
|
"node_modules/appium-android-driver": {
|
|
1281
|
-
"version": "5.11.
|
|
1281
|
+
"version": "5.11.2",
|
|
1282
1282
|
"license": "Apache-2.0",
|
|
1283
1283
|
"dependencies": {
|
|
1284
1284
|
"@babel/runtime": "^7.0.0",
|
|
1285
|
-
"appium-adb": "^9.11.
|
|
1285
|
+
"appium-adb": "^9.11.2",
|
|
1286
1286
|
"appium-chromedriver": "^5.2.0",
|
|
1287
1287
|
"asyncbox": "^2.8.0",
|
|
1288
1288
|
"axios": "^1.x",
|
|
1289
1289
|
"bluebird": "^3.4.7",
|
|
1290
1290
|
"io.appium.settings": "^5.0.0",
|
|
1291
|
-
"jimp": "^0.x",
|
|
1292
1291
|
"lodash": "^4.17.4",
|
|
1293
1292
|
"lru-cache": "^7.3.0",
|
|
1294
1293
|
"moment": "^2.24.0",
|
|
@@ -1297,6 +1296,7 @@
|
|
|
1297
1296
|
"portscanner": "2.2.0",
|
|
1298
1297
|
"semver": "^7.0.0",
|
|
1299
1298
|
"shared-preferences-builder": "^0.x",
|
|
1299
|
+
"sharp": "^0.x",
|
|
1300
1300
|
"source-map-support": "^0.x",
|
|
1301
1301
|
"teen_process": "^2.0.0",
|
|
1302
1302
|
"ws": "^8.0.0"
|
|
@@ -1738,6 +1738,10 @@
|
|
|
1738
1738
|
"node": ">=4"
|
|
1739
1739
|
}
|
|
1740
1740
|
},
|
|
1741
|
+
"node_modules/chownr": {
|
|
1742
|
+
"version": "1.1.4",
|
|
1743
|
+
"license": "ISC"
|
|
1744
|
+
},
|
|
1741
1745
|
"node_modules/cli-cursor": {
|
|
1742
1746
|
"version": "3.1.0",
|
|
1743
1747
|
"extraneous": true,
|
|
@@ -1808,12 +1812,14 @@
|
|
|
1808
1812
|
}
|
|
1809
1813
|
},
|
|
1810
1814
|
"node_modules/color": {
|
|
1811
|
-
"version": "
|
|
1812
|
-
"extraneous": true,
|
|
1815
|
+
"version": "4.2.3",
|
|
1813
1816
|
"license": "MIT",
|
|
1814
1817
|
"dependencies": {
|
|
1815
|
-
"color-convert": "^
|
|
1816
|
-
"color-string": "^1.
|
|
1818
|
+
"color-convert": "^2.0.1",
|
|
1819
|
+
"color-string": "^1.9.0"
|
|
1820
|
+
},
|
|
1821
|
+
"engines": {
|
|
1822
|
+
"node": ">=12.5.0"
|
|
1817
1823
|
}
|
|
1818
1824
|
},
|
|
1819
1825
|
"node_modules/color-convert": {
|
|
@@ -1829,7 +1835,6 @@
|
|
|
1829
1835
|
},
|
|
1830
1836
|
"node_modules/color-string": {
|
|
1831
1837
|
"version": "1.9.1",
|
|
1832
|
-
"extraneous": true,
|
|
1833
1838
|
"license": "MIT",
|
|
1834
1839
|
"dependencies": {
|
|
1835
1840
|
"color-name": "^1.0.0",
|
|
@@ -1843,6 +1848,20 @@
|
|
|
1843
1848
|
"color-support": "bin.js"
|
|
1844
1849
|
}
|
|
1845
1850
|
},
|
|
1851
|
+
"node_modules/color/node_modules/color-convert": {
|
|
1852
|
+
"version": "2.0.1",
|
|
1853
|
+
"license": "MIT",
|
|
1854
|
+
"dependencies": {
|
|
1855
|
+
"color-name": "~1.1.4"
|
|
1856
|
+
},
|
|
1857
|
+
"engines": {
|
|
1858
|
+
"node": ">=7.0.0"
|
|
1859
|
+
}
|
|
1860
|
+
},
|
|
1861
|
+
"node_modules/color/node_modules/color-name": {
|
|
1862
|
+
"version": "1.1.4",
|
|
1863
|
+
"license": "MIT"
|
|
1864
|
+
},
|
|
1846
1865
|
"node_modules/colorspace": {
|
|
1847
1866
|
"version": "1.1.4",
|
|
1848
1867
|
"extraneous": true,
|
|
@@ -1852,6 +1871,15 @@
|
|
|
1852
1871
|
"text-hex": "1.0.x"
|
|
1853
1872
|
}
|
|
1854
1873
|
},
|
|
1874
|
+
"node_modules/colorspace/node_modules/color": {
|
|
1875
|
+
"version": "3.2.1",
|
|
1876
|
+
"extraneous": true,
|
|
1877
|
+
"license": "MIT",
|
|
1878
|
+
"dependencies": {
|
|
1879
|
+
"color-convert": "^1.9.3",
|
|
1880
|
+
"color-string": "^1.6.0"
|
|
1881
|
+
}
|
|
1882
|
+
},
|
|
1855
1883
|
"node_modules/combined-stream": {
|
|
1856
1884
|
"version": "1.0.8",
|
|
1857
1885
|
"license": "MIT",
|
|
@@ -1998,6 +2026,26 @@
|
|
|
1998
2026
|
"version": "1.4.1",
|
|
1999
2027
|
"license": "MIT"
|
|
2000
2028
|
},
|
|
2029
|
+
"node_modules/decompress-response": {
|
|
2030
|
+
"version": "6.0.0",
|
|
2031
|
+
"license": "MIT",
|
|
2032
|
+
"dependencies": {
|
|
2033
|
+
"mimic-response": "^3.1.0"
|
|
2034
|
+
},
|
|
2035
|
+
"engines": {
|
|
2036
|
+
"node": ">=10"
|
|
2037
|
+
},
|
|
2038
|
+
"funding": {
|
|
2039
|
+
"url": "https://github.com/sponsors/sindresorhus"
|
|
2040
|
+
}
|
|
2041
|
+
},
|
|
2042
|
+
"node_modules/deep-extend": {
|
|
2043
|
+
"version": "0.6.0",
|
|
2044
|
+
"license": "MIT",
|
|
2045
|
+
"engines": {
|
|
2046
|
+
"node": ">=4.0.0"
|
|
2047
|
+
}
|
|
2048
|
+
},
|
|
2001
2049
|
"node_modules/defaults": {
|
|
2002
2050
|
"version": "1.0.4",
|
|
2003
2051
|
"extraneous": true,
|
|
@@ -2035,6 +2083,13 @@
|
|
|
2035
2083
|
"npm": "1.2.8000 || >= 1.4.16"
|
|
2036
2084
|
}
|
|
2037
2085
|
},
|
|
2086
|
+
"node_modules/detect-libc": {
|
|
2087
|
+
"version": "2.0.1",
|
|
2088
|
+
"license": "Apache-2.0",
|
|
2089
|
+
"engines": {
|
|
2090
|
+
"node": ">=8"
|
|
2091
|
+
}
|
|
2092
|
+
},
|
|
2038
2093
|
"node_modules/diff": {
|
|
2039
2094
|
"version": "5.1.0",
|
|
2040
2095
|
"extraneous": true,
|
|
@@ -2127,6 +2182,13 @@
|
|
|
2127
2182
|
"node_modules/exif-parser": {
|
|
2128
2183
|
"version": "0.1.12"
|
|
2129
2184
|
},
|
|
2185
|
+
"node_modules/expand-template": {
|
|
2186
|
+
"version": "2.0.3",
|
|
2187
|
+
"license": "(MIT OR WTFPL)",
|
|
2188
|
+
"engines": {
|
|
2189
|
+
"node": ">=6"
|
|
2190
|
+
}
|
|
2191
|
+
},
|
|
2130
2192
|
"node_modules/express": {
|
|
2131
2193
|
"version": "4.18.2",
|
|
2132
2194
|
"license": "MIT",
|
|
@@ -2486,6 +2548,10 @@
|
|
|
2486
2548
|
"omggif": "^1.0.10"
|
|
2487
2549
|
}
|
|
2488
2550
|
},
|
|
2551
|
+
"node_modules/github-from-package": {
|
|
2552
|
+
"version": "0.0.0",
|
|
2553
|
+
"license": "MIT"
|
|
2554
|
+
},
|
|
2489
2555
|
"node_modules/glob": {
|
|
2490
2556
|
"version": "8.1.0",
|
|
2491
2557
|
"license": "ISC",
|
|
@@ -3118,6 +3184,16 @@
|
|
|
3118
3184
|
"node": ">=6"
|
|
3119
3185
|
}
|
|
3120
3186
|
},
|
|
3187
|
+
"node_modules/mimic-response": {
|
|
3188
|
+
"version": "3.1.0",
|
|
3189
|
+
"license": "MIT",
|
|
3190
|
+
"engines": {
|
|
3191
|
+
"node": ">=10"
|
|
3192
|
+
},
|
|
3193
|
+
"funding": {
|
|
3194
|
+
"url": "https://github.com/sponsors/sindresorhus"
|
|
3195
|
+
}
|
|
3196
|
+
},
|
|
3121
3197
|
"node_modules/min-document": {
|
|
3122
3198
|
"version": "2.19.0",
|
|
3123
3199
|
"dependencies": {
|
|
@@ -3154,6 +3230,10 @@
|
|
|
3154
3230
|
"url": "https://github.com/sponsors/isaacs"
|
|
3155
3231
|
}
|
|
3156
3232
|
},
|
|
3233
|
+
"node_modules/mkdirp-classic": {
|
|
3234
|
+
"version": "0.5.3",
|
|
3235
|
+
"license": "MIT"
|
|
3236
|
+
},
|
|
3157
3237
|
"node_modules/moment": {
|
|
3158
3238
|
"version": "2.29.4",
|
|
3159
3239
|
"license": "MIT",
|
|
@@ -3256,6 +3336,10 @@
|
|
|
3256
3336
|
"rimraf": "bin.js"
|
|
3257
3337
|
}
|
|
3258
3338
|
},
|
|
3339
|
+
"node_modules/napi-build-utils": {
|
|
3340
|
+
"version": "1.0.2",
|
|
3341
|
+
"license": "MIT"
|
|
3342
|
+
},
|
|
3259
3343
|
"node_modules/ncp": {
|
|
3260
3344
|
"version": "2.0.0",
|
|
3261
3345
|
"license": "MIT",
|
|
@@ -3275,6 +3359,20 @@
|
|
|
3275
3359
|
"extraneous": true,
|
|
3276
3360
|
"license": "MIT"
|
|
3277
3361
|
},
|
|
3362
|
+
"node_modules/node-abi": {
|
|
3363
|
+
"version": "3.40.0",
|
|
3364
|
+
"license": "MIT",
|
|
3365
|
+
"dependencies": {
|
|
3366
|
+
"semver": "^7.3.5"
|
|
3367
|
+
},
|
|
3368
|
+
"engines": {
|
|
3369
|
+
"node": ">=10"
|
|
3370
|
+
}
|
|
3371
|
+
},
|
|
3372
|
+
"node_modules/node-addon-api": {
|
|
3373
|
+
"version": "6.1.0",
|
|
3374
|
+
"license": "MIT"
|
|
3375
|
+
},
|
|
3278
3376
|
"node_modules/node-fetch": {
|
|
3279
3377
|
"version": "2.6.9",
|
|
3280
3378
|
"license": "MIT",
|
|
@@ -3723,6 +3821,30 @@
|
|
|
3723
3821
|
"lodash": "^4.17.14"
|
|
3724
3822
|
}
|
|
3725
3823
|
},
|
|
3824
|
+
"node_modules/prebuild-install": {
|
|
3825
|
+
"version": "7.1.1",
|
|
3826
|
+
"license": "MIT",
|
|
3827
|
+
"dependencies": {
|
|
3828
|
+
"detect-libc": "^2.0.0",
|
|
3829
|
+
"expand-template": "^2.0.3",
|
|
3830
|
+
"github-from-package": "0.0.0",
|
|
3831
|
+
"minimist": "^1.2.3",
|
|
3832
|
+
"mkdirp-classic": "^0.5.3",
|
|
3833
|
+
"napi-build-utils": "^1.0.1",
|
|
3834
|
+
"node-abi": "^3.3.0",
|
|
3835
|
+
"pump": "^3.0.0",
|
|
3836
|
+
"rc": "^1.2.7",
|
|
3837
|
+
"simple-get": "^4.0.0",
|
|
3838
|
+
"tar-fs": "^2.0.0",
|
|
3839
|
+
"tunnel-agent": "^0.6.0"
|
|
3840
|
+
},
|
|
3841
|
+
"bin": {
|
|
3842
|
+
"prebuild-install": "bin.js"
|
|
3843
|
+
},
|
|
3844
|
+
"engines": {
|
|
3845
|
+
"node": ">=10"
|
|
3846
|
+
}
|
|
3847
|
+
},
|
|
3726
3848
|
"node_modules/process": {
|
|
3727
3849
|
"version": "0.11.10",
|
|
3728
3850
|
"license": "MIT",
|
|
@@ -3749,6 +3871,14 @@
|
|
|
3749
3871
|
"version": "1.1.0",
|
|
3750
3872
|
"license": "MIT"
|
|
3751
3873
|
},
|
|
3874
|
+
"node_modules/pump": {
|
|
3875
|
+
"version": "3.0.0",
|
|
3876
|
+
"license": "MIT",
|
|
3877
|
+
"dependencies": {
|
|
3878
|
+
"end-of-stream": "^1.1.0",
|
|
3879
|
+
"once": "^1.3.1"
|
|
3880
|
+
}
|
|
3881
|
+
},
|
|
3752
3882
|
"node_modules/punycode": {
|
|
3753
3883
|
"version": "2.3.0",
|
|
3754
3884
|
"extraneous": true,
|
|
@@ -3790,6 +3920,30 @@
|
|
|
3790
3920
|
"node": ">= 0.8"
|
|
3791
3921
|
}
|
|
3792
3922
|
},
|
|
3923
|
+
"node_modules/rc": {
|
|
3924
|
+
"version": "1.2.8",
|
|
3925
|
+
"license": "(BSD-2-Clause OR MIT OR Apache-2.0)",
|
|
3926
|
+
"dependencies": {
|
|
3927
|
+
"deep-extend": "^0.6.0",
|
|
3928
|
+
"ini": "~1.3.0",
|
|
3929
|
+
"minimist": "^1.2.0",
|
|
3930
|
+
"strip-json-comments": "~2.0.1"
|
|
3931
|
+
},
|
|
3932
|
+
"bin": {
|
|
3933
|
+
"rc": "cli.js"
|
|
3934
|
+
}
|
|
3935
|
+
},
|
|
3936
|
+
"node_modules/rc/node_modules/ini": {
|
|
3937
|
+
"version": "1.3.8",
|
|
3938
|
+
"license": "ISC"
|
|
3939
|
+
},
|
|
3940
|
+
"node_modules/rc/node_modules/strip-json-comments": {
|
|
3941
|
+
"version": "2.0.1",
|
|
3942
|
+
"license": "MIT",
|
|
3943
|
+
"engines": {
|
|
3944
|
+
"node": ">=0.10.0"
|
|
3945
|
+
}
|
|
3946
|
+
},
|
|
3793
3947
|
"node_modules/read-pkg": {
|
|
3794
3948
|
"version": "5.2.0",
|
|
3795
3949
|
"license": "MIT",
|
|
@@ -4077,6 +4231,54 @@
|
|
|
4077
4231
|
"node": ">=4.0"
|
|
4078
4232
|
}
|
|
4079
4233
|
},
|
|
4234
|
+
"node_modules/sharp": {
|
|
4235
|
+
"version": "0.32.1",
|
|
4236
|
+
"hasInstallScript": true,
|
|
4237
|
+
"license": "Apache-2.0",
|
|
4238
|
+
"dependencies": {
|
|
4239
|
+
"color": "^4.2.3",
|
|
4240
|
+
"detect-libc": "^2.0.1",
|
|
4241
|
+
"node-addon-api": "^6.1.0",
|
|
4242
|
+
"prebuild-install": "^7.1.1",
|
|
4243
|
+
"semver": "^7.5.0",
|
|
4244
|
+
"simple-get": "^4.0.1",
|
|
4245
|
+
"tar-fs": "^2.1.1",
|
|
4246
|
+
"tunnel-agent": "^0.6.0"
|
|
4247
|
+
},
|
|
4248
|
+
"engines": {
|
|
4249
|
+
"node": ">=14.15.0"
|
|
4250
|
+
},
|
|
4251
|
+
"funding": {
|
|
4252
|
+
"url": "https://opencollective.com/libvips"
|
|
4253
|
+
}
|
|
4254
|
+
},
|
|
4255
|
+
"node_modules/sharp/node_modules/lru-cache": {
|
|
4256
|
+
"version": "6.0.0",
|
|
4257
|
+
"license": "ISC",
|
|
4258
|
+
"dependencies": {
|
|
4259
|
+
"yallist": "^4.0.0"
|
|
4260
|
+
},
|
|
4261
|
+
"engines": {
|
|
4262
|
+
"node": ">=10"
|
|
4263
|
+
}
|
|
4264
|
+
},
|
|
4265
|
+
"node_modules/sharp/node_modules/semver": {
|
|
4266
|
+
"version": "7.5.0",
|
|
4267
|
+
"license": "ISC",
|
|
4268
|
+
"dependencies": {
|
|
4269
|
+
"lru-cache": "^6.0.0"
|
|
4270
|
+
},
|
|
4271
|
+
"bin": {
|
|
4272
|
+
"semver": "bin/semver.js"
|
|
4273
|
+
},
|
|
4274
|
+
"engines": {
|
|
4275
|
+
"node": ">=10"
|
|
4276
|
+
}
|
|
4277
|
+
},
|
|
4278
|
+
"node_modules/sharp/node_modules/yallist": {
|
|
4279
|
+
"version": "4.0.0",
|
|
4280
|
+
"license": "ISC"
|
|
4281
|
+
},
|
|
4080
4282
|
"node_modules/shebang-command": {
|
|
4081
4283
|
"version": "2.0.0",
|
|
4082
4284
|
"extraneous": true,
|
|
@@ -4104,7 +4306,7 @@
|
|
|
4104
4306
|
}
|
|
4105
4307
|
},
|
|
4106
4308
|
"node_modules/shiki": {
|
|
4107
|
-
"version": "0.14.
|
|
4309
|
+
"version": "0.14.2",
|
|
4108
4310
|
"extraneous": true,
|
|
4109
4311
|
"license": "MIT",
|
|
4110
4312
|
"dependencies": {
|
|
@@ -4130,9 +4332,49 @@
|
|
|
4130
4332
|
"version": "3.0.7",
|
|
4131
4333
|
"license": "ISC"
|
|
4132
4334
|
},
|
|
4335
|
+
"node_modules/simple-concat": {
|
|
4336
|
+
"version": "1.0.1",
|
|
4337
|
+
"funding": [
|
|
4338
|
+
{
|
|
4339
|
+
"type": "github",
|
|
4340
|
+
"url": "https://github.com/sponsors/feross"
|
|
4341
|
+
},
|
|
4342
|
+
{
|
|
4343
|
+
"type": "patreon",
|
|
4344
|
+
"url": "https://www.patreon.com/feross"
|
|
4345
|
+
},
|
|
4346
|
+
{
|
|
4347
|
+
"type": "consulting",
|
|
4348
|
+
"url": "https://feross.org/support"
|
|
4349
|
+
}
|
|
4350
|
+
],
|
|
4351
|
+
"license": "MIT"
|
|
4352
|
+
},
|
|
4353
|
+
"node_modules/simple-get": {
|
|
4354
|
+
"version": "4.0.1",
|
|
4355
|
+
"funding": [
|
|
4356
|
+
{
|
|
4357
|
+
"type": "github",
|
|
4358
|
+
"url": "https://github.com/sponsors/feross"
|
|
4359
|
+
},
|
|
4360
|
+
{
|
|
4361
|
+
"type": "patreon",
|
|
4362
|
+
"url": "https://www.patreon.com/feross"
|
|
4363
|
+
},
|
|
4364
|
+
{
|
|
4365
|
+
"type": "consulting",
|
|
4366
|
+
"url": "https://feross.org/support"
|
|
4367
|
+
}
|
|
4368
|
+
],
|
|
4369
|
+
"license": "MIT",
|
|
4370
|
+
"dependencies": {
|
|
4371
|
+
"decompress-response": "^6.0.0",
|
|
4372
|
+
"once": "^1.3.1",
|
|
4373
|
+
"simple-concat": "^1.0.0"
|
|
4374
|
+
}
|
|
4375
|
+
},
|
|
4133
4376
|
"node_modules/simple-swizzle": {
|
|
4134
4377
|
"version": "0.2.2",
|
|
4135
|
-
"extraneous": true,
|
|
4136
4378
|
"license": "MIT",
|
|
4137
4379
|
"dependencies": {
|
|
4138
4380
|
"is-arrayish": "^0.3.1"
|
|
@@ -4140,7 +4382,6 @@
|
|
|
4140
4382
|
},
|
|
4141
4383
|
"node_modules/simple-swizzle/node_modules/is-arrayish": {
|
|
4142
4384
|
"version": "0.3.2",
|
|
4143
|
-
"extraneous": true,
|
|
4144
4385
|
"license": "MIT"
|
|
4145
4386
|
},
|
|
4146
4387
|
"node_modules/source-map": {
|
|
@@ -4267,6 +4508,16 @@
|
|
|
4267
4508
|
"url": "https://github.com/sponsors/ljharb"
|
|
4268
4509
|
}
|
|
4269
4510
|
},
|
|
4511
|
+
"node_modules/tar-fs": {
|
|
4512
|
+
"version": "2.1.1",
|
|
4513
|
+
"license": "MIT",
|
|
4514
|
+
"dependencies": {
|
|
4515
|
+
"chownr": "^1.1.1",
|
|
4516
|
+
"mkdirp-classic": "^0.5.2",
|
|
4517
|
+
"pump": "^3.0.0",
|
|
4518
|
+
"tar-stream": "^2.1.4"
|
|
4519
|
+
}
|
|
4520
|
+
},
|
|
4270
4521
|
"node_modules/tar-stream": {
|
|
4271
4522
|
"version": "2.2.0",
|
|
4272
4523
|
"license": "MIT",
|
|
@@ -4417,6 +4668,16 @@
|
|
|
4417
4668
|
"extraneous": true,
|
|
4418
4669
|
"license": "0BSD"
|
|
4419
4670
|
},
|
|
4671
|
+
"node_modules/tunnel-agent": {
|
|
4672
|
+
"version": "0.6.0",
|
|
4673
|
+
"license": "Apache-2.0",
|
|
4674
|
+
"dependencies": {
|
|
4675
|
+
"safe-buffer": "^5.0.1"
|
|
4676
|
+
},
|
|
4677
|
+
"engines": {
|
|
4678
|
+
"node": "*"
|
|
4679
|
+
}
|
|
4680
|
+
},
|
|
4420
4681
|
"node_modules/type-fest": {
|
|
4421
4682
|
"version": "3.8.0",
|
|
4422
4683
|
"license": "(MIT OR CC0-1.0)",
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"automated testing",
|
|
8
8
|
"android"
|
|
9
9
|
],
|
|
10
|
-
"version": "2.
|
|
10
|
+
"version": "2.23.0",
|
|
11
11
|
"author": "Appium Contributors",
|
|
12
12
|
"license": "Apache-2.0",
|
|
13
13
|
"repository": {
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@babel/runtime": "^7.0.0",
|
|
60
60
|
"appium-adb": "^9.11.0",
|
|
61
|
-
"appium-android-driver": "^5.11.
|
|
61
|
+
"appium-android-driver": "^5.11.1",
|
|
62
62
|
"appium-chromedriver": "^5.3.1",
|
|
63
63
|
"appium-uiautomator2-server": "^5.7.2",
|
|
64
64
|
"asyncbox": "^2.3.1",
|