Back to Puppeteer

Browser.userAgent() method

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

19.2.2357 B
Original Source

Browser.userAgent() method

Gets this browser's original user agent.

Pages can override the user agent with Page.setUserAgent().

Signature

typescript
class Browser {
  abstract userAgent(): Promise<string>;
}

Returns:

Promise<string>