Skip to content

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

ParameterTypeDescription
ctxContextThe current Context.
urlstringURL to navigate to.
options?GoToOptionsOptional 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 });

Matterway Assistant SDK Documentation