# WifiCommands

Artifact: [androidx.test.uiautomator:uiautomator-shell](https://developer.android.com/jetpack/androidx/releases/test-uiautomator) [View Source](https://cs.android.com/search?q=file:androidx/test/shell/command/WifiCommands.kt+class:androidx.test.shell.command.WifiCommands) Added in [2.4.1](https://developer.android.com/jetpack/androidx/releases/test-uiautomator#2.4.1)

*** ** * ** ***


```
public final class WifiCommands
```

<br />

*** ** * ** ***

Commands to turn on and off the wifi, and to check whether is enabled.

## Summary

| ### Public methods |
|---|---|
| `final boolean` | `https://developer.android.com/reference/androidx/test/shell/command/WifiCommands#isEnabled()()` Returns whether the wifi is enabled. |
| `final void` | `https://developer.android.com/reference/androidx/test/shell/command/WifiCommands#turnOff()()` Turns off the wifi. |
| `final void` | `https://developer.android.com/reference/androidx/test/shell/command/WifiCommands#turnOn()()` Turns on the wifi. |

## Public methods

### isEnabled

Added in [2.4.1](https://developer.android.com/jetpack/androidx/releases/test-uiautomator#2.4.1)

```
public final boolean isEnabled()
```

Returns whether the wifi is enabled.

### turnOff

Added in [2.4.1](https://developer.android.com/jetpack/androidx/releases/test-uiautomator#2.4.1)

```
public final void turnOff()
```

Turns off the wifi.

### turnOn

Added in [2.4.1](https://developer.android.com/jetpack/androidx/releases/test-uiautomator#2.4.1)

```
public final void turnOn()
```

Turns on the wifi.