Skip to content

toggleDarkMode ​

Toggle dark mode on or off during test execution.

Partial support in Astra Scout

Works on Android devices and emulators and on the iOS Simulator. On a real iPhone the command fails, because WebDriverAgent has no way to change the appearance setting.

Toggles the device's system-wide dark mode (light/dark appearance) state.

INFO

On Android, this toggles the system night mode setting. On iOS, this controls the simulator's system appearance.

Syntax ​

This command takes no arguments.

yaml
- toggleDarkMode