goto
Navigates to a specified URL on the provided playwright page.
Examples
Parameters
• page: Page
The Playwright page object to navigate.
• url: string
The URL to navigate to.
• options?
• options.referer?: string
Referer header value. If provided, it will take preference over the referer header value set by page.setExtraHTTPHeaders(headers)
.
• options.throwOnTimeout?: boolean
Whether to throw if the page.goto
times out. By default, it ignores the error.
• options.timeout?: number
Maximum operation time in milliseconds. Defaults to 0
(no timeout). This can be configured via various timeout settings on the page or browser context.
• options.waitUntil?: "load"
| "domcontentloaded"
| "networkidle"
| "commit"
When to consider the operation succeeded. Defaults to networkidle
(playwright default to load
).
Returns
ReturnType
<Page
["goto"
]>
- A promise that resolves to the response of the navigation, or null if no response was received.