Skip to main content
Version: 3.2

PlaywrightHook

Hierarchy

  • BrowserHook<PlaywrightCrawlingContext, PlaywrightGotoOptions>
    • PlaywrightHook

Callable

  • PlaywrightHook(crawlingContext: PlaywrightCrawlingContext<Dictionary<any>>, gotoOptions: undefined | { referer?: string; timeout?: number; waitUntil?: domcontentloaded | load | networkidle | commit }): Awaitable<void>

  • Parameters

    • crawlingContext: PlaywrightCrawlingContext<Dictionary<any>>
    • gotoOptions: undefined | { referer?: string; timeout?: number; waitUntil?: domcontentloaded | load | networkidle | commit }
      • externaloptionalreferer: string

        Referer header value. If provided it will take preference over the referer header value set by page.setExtraHTTPHeaders(headers).

      • externaloptionaltimeout: number

        Maximum operation time in milliseconds, defaults to 30 seconds, pass 0 to disable timeout. The default value can be changed by using the browserContext.setDefaultNavigationTimeout(timeout), browserContext.setDefaultTimeout(timeout), page.setDefaultNavigationTimeout(timeout) or page.setDefaultTimeout(timeout) methods.

      • externaloptionalwaitUntil: domcontentloaded | load | networkidle | commit

        When to consider operation succeeded, defaults to load. Events can be either:

        • 'domcontentloaded' - consider operation to be finished when the DOMContentLoaded event is fired.
        • 'load' - consider operation to be finished when the load event is fired.
        • 'networkidle' - consider operation to be finished when there are no network connections for at least 500 ms.
        • 'commit' - consider operation to be finished when network response is received and the document started loading.

    Returns Awaitable<void>