Page Domain
Actions and events related to the inspected page belong to the page domain.
Methods
- Page.clearGeolocationOverride
- Page.disable
- Page.enable
- Page.handleJavaScriptDialog
- Page.navigate
- Page.reload
- Page.setGeolocationOverride
Events
- Page.domContentEventFired
- Page.frameAttached
- Page.frameDetached
- Page.frameNavigated
- Page.interstitialHidden
- Page.interstitialShown
- Page.javascriptDialogClosed
- Page.javascriptDialogOpening
- Page.loadEventFired
- Page.navigationRequested
Types
Methods
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
Optional
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
Page.reload #
Reloads given page optionally ignoring the cache.
It isn't clear what the ignoreCache parameter of @cdp Page.reload should mean in React Native. We parse it, but don't do anything with it yet.
TODO: Implement scriptToEvaluateOnLoad parameter of @cdp Page.reload.
Parameters
ignoreCache
Optional
boolean
If true, browser cache is ignored (as if the user pressed Shift+refresh).
scriptToEvaluateOnLoad
Optional
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
Optional
number
Mock latitude
longitude
Optional
number
Mock longitude
accuracy
Optional
number
Mock accuracy
Events
Page.frameAttached #
Fired when frame has been attached to its parent.
Parameters
frameId
Id of the frame that has been attached.
parentFrameId
Parent frame identifier.
Page.frameDetached #
Fired when frame has been detached from its parent.
Parameters
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 object.
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
Dialog type.
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
Optional
string
Parent frame identifier.
loaderId
Identifier of the loader associated with this frame.
name
Optional
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.ResourceType #
Resource type as it was perceived by the rendering engine.
Type: string
Allowed values: Document
, Stylesheet
, Image
, Media
, Font
, Script
, TextTrack
, XHR
, Fetch
, EventSource
, WebSocket
, Manifest
, Other