# setWindowSize

Resizes browser window outer size according to provided width and height. Based on your operating system some browser windows might now allow you so have a smaller width than `500px`. If you want to mimic the viewport of e.g. an iPhone you should consider using the `setViewport` command.

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

```
await browser.setWindowSize(width, height)
```

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

| Name     | Type     | Details                                    |
| -------- | -------- | ------------------------------------------ |
| `width`  | `number` | browser will be resized to provided width  |
| `height` | `number` | browser will be resized to provided height |

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

* **\<Null|Object>** **`return`:** Null for *NO*W3C browser and Object `{x, y, width, height}` for W3C browser
