puppeteer/docs/api/puppeteer.browser.useragent.md

22 lines
382 B
Markdown
Raw Normal View History

2022-07-05 13:41:43 +00:00
---
sidebar_label: Browser.userAgent
---
# Browser.userAgent() method
2023-09-18 09:05:23 +00:00
Gets this [browser's](./puppeteer.browser.md) original user agent.
[Pages](./puppeteer.page.md) can override the user agent with [Page.setUserAgent()](./puppeteer.page.setuseragent.md).
2022-07-05 13:41:43 +00:00
#### Signature:
2022-07-05 13:41:43 +00:00
```typescript
class Browser {
userAgent(): Promise<string>;
}
```
**Returns:**
Promise&lt;string&gt;