UNPKG

appium-uiautomator2-driver

Version:
19 lines 984 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.mobileInstallMultipleApks = mobileInstallMultipleApks; const driver_1 = require("appium/driver"); const extensions_1 = require("../extensions"); /** * Installs multiple APKs with `install-multiple` option. * @param apks - Array of APK file paths or URLs to install. * @param options - Optional installation options (allowTestPackages, useSdcard, grantPermissions, etc.). * @throws {errors.InvalidArgumentError} If the apks array is empty or invalid. */ async function mobileInstallMultipleApks(apks, options) { if (!Array.isArray(apks) || apks.length === 0) { throw new driver_1.errors.InvalidArgumentError('No apks are given to install'); } const configuredApks = await Promise.all(apks.map((app) => this.helpers.configureApp(app, [extensions_1.APK_EXTENSION]))); await this.adb.installMultipleApks(configuredApks, options); } //# sourceMappingURL=app-management.js.map