sdk.automation.gotopage
Home > @matterway/sdk > Automation > goToPage
Automation.goToPage() function
Navigates to the specified URL in the given browser tab.
Signature:
export declare function goToPage(ctx: Context, url: string, options?: WaitForOptions): Promise<void>;
Parameters
Parameter | Type | Description |
---|---|---|
ctx | Context | Context object. |
url | string | URL to navigate to. |
options | WaitForOptions | (Optional) Optional Puppeteer options for waiting. |
Returns:
Promise<void>
Example
// Navigates to "https://example.com" and waits until the network is idle for 1 second.
await goToPage(ctx, 'https://example.com', { waitUntil: 'networkidle0', timeout: 1000 });