powerCapacity
Set the battery percentage on the Android emulator. Value must be in the range [0, 100].
Usage​
await browser.powerCapacity(percent)
Parameters​
| Name | Type | Details |
|---|---|---|
percent | number | The battery percentage to set (0–100) |
Example​
powerCapacity.js
it('should set battery to 75%', async () => {
await browser.powerCapacity(75)
})
Support​
Supported platforms: Android
note
Refer to the official Appium driver documentation to see which driver versions support this command.