முக்கிய உள்ளடக்கத்திற்குச் செல்லவும்

toggleAirplaneMode

Set the airplane mode state on the device.

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

குறிப்பு

Unlike the deprecated API which toggled the airplane mode state, this command requires an explicit enabled parameter to set the desired state directly.

This command is only supported on Android.

Usage

await browser.toggleAirplaneMode(enabled)

Parameters

NameTypeDetails
enabledbooleanSet to true to enable airplane mode, false to disable it.

Example

toggleAirplaneMode.js
it('should set airplane mode', async () => {
// Enable airplane mode
await browser.toggleAirplaneMode(true)
// Disable airplane mode
await browser.toggleAirplaneMode(false)
})

Support

Support for android

Supported platforms: Android

குறிப்பு

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

Welcome! How can I help?

WebdriverIO AI Copilot