Appearance
Function: goToPage()
ts
function goToPage(
ctx: Context,
url: string,
options?: GoToOptions): Promise<void>;Defined in: src/pages/index.ts:208
Navigate to a URL in the current tab.
Parameters
| Parameter | Type | Description |
|---|---|---|
ctx | Context | The current Context. |
url | string | URL to navigate to. |
options? | GoToOptions | Optional Puppeteer GoToOptions. |
Returns
Promise<void>
Example
ts
// Navigate to the dashboard and wait until the network is idle.
await goToPage(ctx, 'https://dashboard.megacorp.com', { waitUntil: 'networkidle0', timeout: 5000 });