UNPKG

appium-uiautomator2-driver

Version:
16 lines 644 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.mobileGetBatteryInfo = mobileGetBatteryInfo; /** * Reads the battery information from the device under test. * @returns Battery information including level (0.0-1.0) and state (charging, discharging, etc.). */ async function mobileGetBatteryInfo() { const result = (await this.uiautomator2.jwproxy.command('/appium/device/battery_info', 'GET', {})); const batteryInfo = result; // Give it the same name as in iOS batteryInfo.state = result.status; delete batteryInfo.status; return batteryInfo; } //# sourceMappingURL=battery.js.map