PlaywrightHook
Hierarchy
- BrowserHook<PlaywrightCrawlingContext, PlaywrightGotoOptions>
- PlaywrightHook
Callable
Parameters
crawlingContext: PlaywrightCrawlingContext<Dictionary>
gotoOptions: undefined | { referer?: string; timeout?: number; waitUntil?: domcontentloaded | load | networkidle | commit }
externaloptionalreferer: string
externaloptionaltimeout: number
Maximum operation time in milliseconds. Defaults to
0
- no timeout. The default value can be changed vianavigationTimeout
option in the config, or 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 theDOMContentLoaded
event is fired.'load'
- consider operation to be finished when theload
event is fired.'networkidle'
- DISCOURAGED consider operation to be finished when there are no network connections for at least500
ms. Don't use this method for testing, rely on web assertions to assess readiness instead.'commit'
- consider operation to be finished when network response is received and the document started loading.
Returns Awaitable<void>
Referer header value. If provided it will take preference over the referer header value set by page.setExtraHTTPHeaders(headers).