# Mobile JSON Wire Protocol

## getPageIndex[​](#getpageindex "Direct link to getPageIndex")

Mobile JSON Wire Protocol command. More details can be found in the [official protocol docs](https://github.com/appium/appium-base-driver/blob/master/docs/mjsonwp/protocol-methods.md#mobile-json-wire-protocol-endpoints).

caution

This protocol command is deprecated<br />In Appium 2.0, this method is marked as deprecated and currently has no available alternatives.

### Usage[​](#usage "Direct link to Usage")

```
await driver.getPageIndex()
```

### Returns[​](#returns "Direct link to Returns")

* **\<string>**

***

## getNetworkConnection[​](#getnetworkconnection "Direct link to getNetworkConnection")

Mobile JSON Wire Protocol command. More details can be found in the [official protocol docs](https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#device-modes).

caution

This protocol command is deprecated<br />For Appium Android automation, use `driver.execute('mobile: getConnectivity', { ... })` instead

### Usage[​](#usage-1 "Direct link to Usage")

```
await driver.getNetworkConnection()
```

### Returns[​](#returns-1 "Direct link to Returns")

* **\<number>** **`connectionType`:** see <https://appium.github.io/appium.io/docs/en/writing-running-appium/other/network-connection/>

***

## setNetworkConnection[​](#setnetworkconnection "Direct link to setNetworkConnection")

Mobile JSON Wire Protocol command. More details can be found in the [official protocol docs](https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#device-modes).

caution

This protocol command is deprecated<br />For Appium Android automation, use `driver.execute('mobile: setConnectivity', { ... })` instead

### Usage[​](#usage-2 "Direct link to Usage")

```
await driver.setNetworkConnection(type)
```

### Parameters[​](#parameters "Direct link to Parameters")

| Name   | Type     | Details                                                                  |
| ------ | -------- | ------------------------------------------------------------------------ |
| `type` | `number` | a bit mask that should be translated to an integer value when serialized |

***

## touchPerform[​](#touchperform "Direct link to touchPerform")

Mobile JSON Wire Protocol command. More details can be found in the [official protocol docs](https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#touch-gestures).

caution

This protocol command is deprecated<br />For Appium, use `driver.performActions(...)` instead

### Usage[​](#usage-3 "Direct link to Usage")

```
await driver.touchPerform(actions)
```

### Parameters[​](#parameters-1 "Direct link to Parameters")

| Name      | Type       | Details                                                                                |
| --------- | ---------- | -------------------------------------------------------------------------------------- |
| `actions` | `object[]` | a list of objects, each of which represents an input source and its associated actions |

***

## multiTouchPerform[​](#multitouchperform "Direct link to multiTouchPerform")

Mobile JSON Wire Protocol command. More details can be found in the [official protocol docs](https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#touch-gestures).

caution

This protocol command is deprecated<br />For Appium, use `driver.performActions(...)` instead

### Usage[​](#usage-4 "Direct link to Usage")

```
await driver.multiTouchPerform(actions, elementId)
```

### Parameters[​](#parameters-2 "Direct link to Parameters")

| Name                        | Type       | Details                                                                                |
| --------------------------- | ---------- | -------------------------------------------------------------------------------------- |
| `actions`                   | `object[]` | a list of objects, each of which represents an input source and its associated actions |
| `elementId`<br />*optional* | `object[]` | the id of an element returned in a previous call to Find Element(s)                    |

***

## receiveAsyncResponse[​](#receiveasyncresponse "Direct link to receiveAsyncResponse")

Mobile JSON Wire Protocol command. More details can be found in the [official protocol docs](https://github.com/appium/appium-base-driver/blob/master/docs/mjsonwp/protocol-methods.md#mobile-json-wire-protocol-endpoints).

caution

This protocol command is deprecated<br />For Appium, use `driver.executeAsyncScript(...)` instead

### Usage[​](#usage-5 "Direct link to Usage")

```
await driver.receiveAsyncResponse(status, value)
```

### Parameters[​](#parameters-3 "Direct link to Parameters")

| Name     | Type     | Details                             |
| -------- | -------- | ----------------------------------- |
| `status` | `string` | the expected status of the response |
| `value`  | `string` | the expected value of the response  |
