---
sidebar_label: BrowserContext.setCookie
---

# BrowserContext.setCookie() method

Sets a cookie in the browser context.

### Signature

```typescript
class BrowserContext {
  abstract setCookie(...cookies: CookieData[]): Promise<void>;
}
```

## Parameters

<table><thead><tr><th>

Parameter

</th><th>

Type

</th><th>

Description

</th></tr></thead>
<tbody><tr><td>

cookies

</td><td>

[CookieData](./puppeteer.cookiedata.md)\[\]

</td><td>

</td></tr>
</tbody></table>

**Returns:**

Promise&lt;void&gt;
