# pause

Pauses execution for a specific amount of time. It is recommended to not use this command to wait for an element to show up. In order to avoid flaky test results it is better to use commands like [`waitForExist`](/docs/api/element/waitForExist.md) or other waitFor\* commands.

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

```
await browser.pause(milliseconds)
```

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

| Name           | Type     | Details    |
| -------------- | -------- | ---------- |
| `milliseconds` | `number` | time in ms |

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

pause.js

```
it('should pause the execution', async () => {
    const starttime = new Date().getTime()
    await browser.pause(3000)
    const endtime = new Date().getTime()
    console.log(endtime - starttime) // outputs: 3000
});
```
