UNPKG

appium-android-driver

Version:

Android UiAutomator and Chrome support for Appium

30 lines 1.37 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.mobileExecEmuConsoleCommand = mobileExecEmuConsoleCommand; const driver_1 = require("appium/driver"); const EMU_CONSOLE_FEATURE = 'emulator_console'; /** * Executes an emulator console command. * * @param command - The actual command to execute. * @param execTimeout - A timeout used to wait for a server reply to the given command in * milliseconds. 60000ms by default * @param connTimeout - Console connection timeout in milliseconds. 5000ms by default. * @param initTimeout - Telnet console initialization timeout in milliseconds (the time between the * connection happens and the command prompt is available) * @returns The command output * @throws {errors.InvalidArgumentError} If command is not provided * @see {@link https://developer.android.com/studio/run/emulator-console} */ async function mobileExecEmuConsoleCommand(command, execTimeout, connTimeout, initTimeout) { this.assertFeatureEnabled(EMU_CONSOLE_FEATURE); if (!command) { throw new driver_1.errors.InvalidArgumentError(`The 'command' argument is mandatory`); } return await this.adb.execEmuConsoleCommand(command, { execTimeout, connTimeout, initTimeout, }); } //# sourceMappingURL=emulator-console.js.map