# Network Connection

{% hint style="info" %}
This feature is currently in Beta for Android Only.
{% endhint %}

Moropo lets you mimic offline mode in your app. Use this feature to build tests that assert your app behaves correctly when the network drops.

<img src="/files/Y4fnJtM98qfdSglQ7EO0" alt="" data-size="original">

### Use the Network Connection runScript step

<figure><img src="/files/vSFmGouGccBaQnKauFXD" alt=""><figcaption></figcaption></figure>

Trigger using the [runScript](/creating-tests/commands/runflow-1.md) command.

To disable the network, set enabled to `false`. To re-enable network, set enabled to `true`.

Copy this snippet into your test to try it now:

```
- runScript:
    file: './moropo.js'
    env:
      command: 'networkConnection'
      enabled: 'false'
- takeScreenshot: 'Network off'
```

#### Which platforms are supported?

Currently, only Android. If you need this feature on iOS, please email <support@moropo.com>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.moropo.com/creating-tests/advanced-use-cases/network-connection.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
