← Back to Page domain

Page.navigate

Navigates current page to the given URL.

Domain: Page stable

Parameters

NameTypeDescription
urlstringURL to navigate the page to.
referrer (optional)stringReferrer URL.
transitionType (optional)TransitionTypeIntended transition type.
frameId (optional)FrameIdFrame id to navigate, if not specified navigates the top frame.
referrerPolicy (optional)ReferrerPolicyReferrer-policy used for the navigation.

Returns

NameTypeDescription
frameIdFrameIdFrame id that has navigated (or failed to navigate)
loaderIdNetwork.LoaderIdLoader identifier. This is omitted in case of same-document navigation, as the previously committed loaderId would not change.
errorTextstringUser friendly error message, present if and only if navigation has failed.
isDownloadbooleanWhether the navigation resulted in a download.

Example Request

{
  "id": 1,
  "method": "Page.navigate",
  "params": {
    "url": "https://example.com"
  }
}

Example Response

{
  "id": 1,
  "result": {
    "frameId": "ABC123DEF456",
    "loaderId": "LOADER_001",
    "errorText": "errorText-value",
    "isDownload": true
  }
}

Usage in Node.js

const result = await send('Page.navigate', {"url": "https://example.com"});
console.log(result);
// {"frameId": "ABC123DEF456", "loaderId": "LOADER_001", "errorText": "errorText-value", "isDownload": true}