appium-uiautomator2-driver
Version:
UiAutomator2 integration for Appium
19 lines • 984 B
JavaScript
;
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