Chrome DevTools Protocol

Methods

Page.clearGeolocationOverride

Clears the overriden Geolocation Position and Error.

Page.disable

Disables page domain notifications.

Page.enable

Enables page domain notifications.

Page.handleJavaScriptDialog

Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).

parameters
accept
boolean

Whether to accept or dismiss the dialog.

promptText
string

The text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog.

Page.navigate

Navigates current page to the given URL.

parameters
url
string

URL to navigate the page to.

Return Object
frameId
FrameId

Frame id that will be navigated.

Experimental

Page.reload

Reloads given page optionally ignoring the cache.

parameters
ignoreCache
boolean

If true, browser cache is ignored (as if the user pressed Shift+refresh).

scriptToEvaluateOnLoad
string

If set, the script will be injected into all frames of the inspected page after reload.

Page.setGeolocationOverride

Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.

parameters
latitude
number

Mock latitude

longitude
number

Mock longitude

accuracy
number

Mock accuracy

Events

Page.domContentEventFired

parameters
timestamp
number

Page.frameAttached

Fired when frame has been attached to its parent.

parameters
frameId
FrameId

Id of the frame that has been attached.

parentFrameId
FrameId

Parent frame identifier.

Page.frameDetached

Fired when frame has been detached from its parent.

parameters
frameId
FrameId

Id of the frame that has been detached.

Page.frameNavigated

Fired once navigation of the frame has completed. Frame is now associated with the new loader.

parameters
frame
Frame

Frame object.

Page.interstitialHidden

Fired when interstitial page was hidden

Page.interstitialShown

Fired when interstitial page was shown

Page.javascriptDialogClosed

Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed.

parameters
result
boolean

Whether dialog was confirmed.

Page.javascriptDialogOpening

Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open.

parameters
message
string

Message that will be displayed by the dialog.

type
DialogType

Dialog type.

Page.loadEventFired

parameters
timestamp
number

Page.navigationRequested

Fired when a navigation is started if navigation throttles are enabled. The navigation will be deferred until processNavigation is called.

parameters
isInMainFrame
boolean

Whether the navigation is taking place in the main frame or in a subframe.

isRedirect
boolean

Whether the navigation has encountered a server redirect or not.

navigationId
integer
url
string

URL of requested navigation.

Types

Page.Frame

Information about the Frame on the page.

Type: object

properties
id
string

Frame unique identifier.

parentId
string

Parent frame identifier.

loaderId
Network.LoaderId

Identifier of the loader associated with this frame.

name
string

Frame's name as specified in the tag.

url
string

Frame document's URL.

securityOrigin
string

Frame document's security origin.

mimeType
string

Frame document's mimeType as determined by the browser.

Page.FrameId

Unique frame identifier.

Type: string

Page.ResourceType

Resource type as it was perceived by the rendering engine.

Allowed Values: Document, Stylesheet, Image, Media, Font, Script, TextTrack, XHR, Fetch, EventSource, WebSocket, Manifest, Other

Type: string