toggleNetworkSpeed
Set the network speed for the Android emulator. Valid values: 'full', 'gsm', 'edge', 'hscsd', 'gprs', 'umts', 'hsdpa', 'lte', 'evdo'.
Note: Falls back to the deprecated Appium 2 protocol endpoint if the driver does not support the
mobile:execute method.
Usage
browser.toggleNetworkSpeed(netspeed)
Parameters
| Name | Type | Details |
|---|---|---|
netspeed | string | The network speed preset to apply ('full', 'gsm', 'edge', 'hscsd', 'gprs', 'umts', 'hsdpa', 'lte', 'evdo') |
Example
toggleNetworkSpeed.js
it('should set network speed to LTE', async () => {
await browser.toggleNetworkSpeed('lte')
})
Support
备注
Refer to the official Appium driver documentation to see which driver versions support this command.