puppeteer/website/versioned_docs/version-22.8.1/api/puppeteer.browser.useragent.md

22 lines
391 B
Markdown
Raw Normal View History

---
sidebar_label: Browser.userAgent
---
# Browser.userAgent() method
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-10-24 14:31:12 +00:00
#### Signature:
```typescript
class Browser {
abstract userAgent(): Promise<string>;
}
```
**Returns:**
Promise&lt;string&gt;