Hoppa till huvudinnehåll

powerAC

Set the state of the battery charger on the Android emulator. Valid values: 'on', 'off'.

Note: Falls back to the deprecated Appium 2 protocol endpoint if the driver does not support the mobile: execute method.

Usage
browser.powerAC(state)
Parameters
NameTypeDetails
statestringThe charger state to set ('on' or 'off')
Example
powerAC.js
it('should enable the AC charger', async () => {
await browser.powerAC('on')
})
Support

Support for android

anteckning

Refer to the official Appium driver documentation to see which driver versions support this command.

Welcome! How can I help?

WebdriverIO AI Copilot