# sendSms

Simulate an SMS message being received on the Android emulator.

> **Note:** Falls back to the deprecated Appium 2 protocol endpoint if the driver does not support the `mobile:` execute method.

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

```
await browser.sendSms(phoneNumber, message)
```

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

| Name          | Type     | Details                                         |
| ------------- | -------- | ----------------------------------------------- |
| `phoneNumber` | `string` | The phone number the simulated SMS is sent from |
| `message`     | `string` | The text content of the simulated SMS           |

## Example[​](#example "Direct link to Example")

sendSms.js

```
it('should simulate receiving an SMS', async () => {
    await browser.sendSms('+15551234567', 'Hello from the test!')
})
```

## Support[​](#support "Direct link to Support")

![Support for android](/assets/images/android-d941e94d5839760141de31c8446b67ce.svg)

**Supported platforms:** Android

note

Refer to the official [Appium driver documentation](https://appium.io/docs/en/latest/ecosystem/) to see which driver versions support this command.
