Options
All
  • Public
  • Public/Protected
  • All
Menu

Module node_modules/@types/puppeteer

Index

Namespaces

Interfaces

Type aliases

Variables

Functions

Type aliases

ConsoleMessageType

ConsoleMessageType: "log" | "debug" | "info" | "error" | "warning" | "dir" | "dirxml" | "table" | "trace" | "clear" | "startGroup" | "startGroupCollapsed" | "endGroup" | "assert" | "profile" | "profileEnd" | "count" | "timeEnd"

DialogType

DialogType: "alert" | "beforeunload" | "confirm" | "prompt"

ErrorCode

ErrorCode: "aborted" | "accessdenied" | "addressunreachable" | "blockedbyclient" | "blockedbyresponse" | "connectionaborted" | "connectionclosed" | "connectionfailed" | "connectionrefused" | "connectionreset" | "internetdisconnected" | "namenotresolved" | "timedout" | "failed"

EvaluateFn

EvaluateFn<T>: string | ((arg1: T, ...args: any[]) => any)

Type parameters

  • T = any

EvaluateFnReturnType

EvaluateFnReturnType<T>: T extends (...args: any[]) => infer R ? R : unknown

Type parameters

Headers

Headers: Record<string, string>

HttpMethod

HttpMethod: "GET" | "POST" | "PATCH" | "PUT" | "DELETE" | "OPTIONS"

LayoutDimension

LayoutDimension: string | number

Accepts values labeled with units. If number, treat as pixels.

LoadEvent

LoadEvent: "load" | "domcontentloaded" | "networkidle0" | "networkidle2"

MediaType

MediaType: "screen" | "print"

MouseButtons

MouseButtons: "left" | "right" | "middle"

PDFFormat

PDFFormat: "Letter" | "Legal" | "Tabloid" | "Ledger" | "A0" | "A1" | "A2" | "A3" | "A4" | "A5" | "A6"

Permission

Permission: "geolocation" | "midi" | "midi-sysex" | "notifications" | "push" | "camera" | "microphone" | "background-sync" | "ambient-light-sensor" | "accelerometer" | "gyroscope" | "magnetometer" | "accessibility-events" | "clipboard-read" | "clipboard-write" | "payment-handler"

Platform

Platform: LiteralUnion<"mac" | "win32" | "win64" | "linux">

Product

Product: LiteralUnion<"chrome" | "firefox">

ResourceType

ResourceType: "document" | "stylesheet" | "image" | "media" | "font" | "script" | "texttrack" | "xhr" | "fetch" | "eventsource" | "websocket" | "manifest" | "other"

SameSiteSetting

SameSiteSetting: "Strict" | "Lax"

Serializable

Serializable: number | string | boolean | null | JSONArray | JSONObject

SerializableOrJSHandle

SerializableOrJSHandle: Serializable | JSHandle

TargetType

TargetType: "page" | "background_page" | "shared_worker" | "service_worker" | "browser" | "other"

UnwrapElementHandle

UnwrapElementHandle<X>: X extends ElementHandle<infer E> ? E : X

Unwraps a DOM element out of an ElementHandle instance

Type parameters

  • X

WrapElementHandle

WrapElementHandle<X>: X extends Element ? ElementHandle<X> : X

Wraps a DOM element into an ElementHandle instance

Type parameters

  • X

Variables

devices

devices: {}

Type declaration

Const product

product: Product

The name of the browser that is under automation ("chrome" or "firefox")

The product is set by the PUPPETEER_PRODUCT environment variable or the product option in puppeteer.launch([options]) and defaults to chrome. Firefox support is experimental.

Functions

clearCustomQueryHandlers

  • clearCustomQueryHandlers(): void
  • Clears all registered handlers.

    Returns void

connect

  • Attaches Puppeteer to an existing Chromium instance

    Parameters

    Returns Promise<Browser>

createBrowserFetcher

  • This methods attaches Puppeteer to an existing Chromium instance.

    Parameters

    Returns BrowserFetcher

customQueryHandlerNames

  • customQueryHandlerNames(): string[]
  • Returns string[]

    a list with the names of all registered custom query handlers.

defaultArgs

  • The default flags that Chromium will be launched with

    Parameters

    Returns string[]

executablePath

  • executablePath(): string
  • Path where Puppeteer expects to find bundled Chromium

    Returns string

launch

  • The method launches a browser instance with given arguments. The browser will be closed when the parent node.js process is closed.

    Parameters

    Returns Promise<Browser>

registerCustomQueryHandler

  • Registers a custom query handler. After registration, the handler can be used everywhere where a selector is expected by prepending the selection string with <name>/. The name is only allowed to consist of lower- and upper case latin letters.

    example
    puppeteer.registerCustomQueryHandler('text', { … });
    const aHandle = await page.$('text/…');
    

    Parameters

    Returns void

unregisterCustomQueryHandler

  • unregisterCustomQueryHandler(name: string): void
  • Parameters

    • name: string

      The name of the query handler to unregistered.

    Returns void

Generated using TypeDoc