# 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)

*** ** * ** ***


```
class WifiCommands
```

<br />

*** ** * ** ***

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

## Summary

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/test/shell/command/WifiCommands#isEnabled()()` Returns whether the wifi is enabled. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/test/shell/command/WifiCommands#turnOff()()` Turns off the wifi. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/test/shell/command/WifiCommands#turnOn()()` Turns on the wifi. |

## Public functions

### isEnabled

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

```
fun isEnabled(): Boolean
```

Returns whether the wifi is enabled.

### turnOff

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

```
fun turnOff(): Unit
```

Turns off the wifi.

### turnOn

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

```
fun turnOn(): Unit
```

Turns on the wifi.