Skip to main content

Module page

Module page 

Source
Expand description

Actions and events related to the inspected page belong to the page domain.

Method names for the Page domain, for use with CdpClient::call.

Constants§

ADD_COMPILATION_CACHE
Seeds compilation cache for given url. Compilation cache does not survive cross-process navigation.
ADD_SCRIPT_TO_EVALUATE_ON_LOAD
Deprecated, please use addScriptToEvaluateOnNewDocument instead.
ADD_SCRIPT_TO_EVALUATE_ON_NEW_DOCUMENT
Evaluates given script in every frame upon creation (before loading frame’s scripts).
BRING_TO_FRONT
Brings page to front (activates tab).
CAPTURE_SCREENSHOT
Capture page screenshot.
CAPTURE_SNAPSHOT
Returns a snapshot of the page as a string. For MHTML format, the serialization includes iframes, shadow DOM, external resources, and element-inline styles.
CLEAR_COMPILATION_CACHE
Clears seeded compilation cache.
CLEAR_DEVICE_METRICS_OVERRIDE
Clears the overridden device metrics.
CLEAR_DEVICE_ORIENTATION_OVERRIDE
Clears the overridden Device Orientation.
CLEAR_GEOLOCATION_OVERRIDE
Clears the overridden Geolocation Position and Error.
CLOSE
Tries to close page, running its beforeunload hooks, if any.
CRASH
Crashes renderer on the IO thread, generates minidumps.
CREATE_ISOLATED_WORLD
Creates an isolated world for the given frame.
DELETE_COOKIE
Deletes browser cookie with given name, domain and path.
DISABLE
Disables page domain notifications.
ENABLE
Enables page domain notifications.
GENERATE_TEST_REPORT
Generates a report for testing.
GET_AD_SCRIPT_ANCESTRY
Page.getAdScriptAncestry
GET_ANNOTATED_PAGE_CONTENT
Get the annotated page content for the main frame. This is an experimental command that is subject to change.
GET_APP_ID
Returns the unique (PWA) app id, along with IWA bundle ID and parent app info. Only returns values if the feature flag ‘WebAppEnableManifestId’ is enabled
GET_APP_MANIFEST
Gets the processed manifest for this current document. This API always waits for the manifest to be loaded. If manifestId is provided, and it does not match the manifest of the current document, this API errors out. If there is not a loaded page, this API errors out immediately.
GET_FRAME_TREE
Returns present frame tree structure.
GET_INSTALLABILITY_ERRORS
Page.getInstallabilityErrors
GET_LAYOUT_METRICS
Returns metrics relating to the layouting of the page, such as viewport bounds/scale.
GET_MANIFEST_ICONS
Deprecated because it’s not guaranteed that the returned icon is in fact the one used for PWA installation.
GET_NAVIGATION_HISTORY
Returns navigation history for the current page.
GET_ORIGIN_TRIALS
Get Origin Trials on given frame.
GET_PERMISSIONS_POLICY_STATE
Get Permissions Policy state on given frame.
GET_RESOURCE_CONTENT
Returns content of the given resource.
GET_RESOURCE_TREE
Returns present frame / resource tree structure.
GET_SIBLING_SUB_APPS
Returns the list of sibling Sub-Apps sharing the same parent app if the inspected context is a Sub-App.
GET_SPELL_CHECK_CUSTOM_DICTIONARY
Returns the words that the frame’s document added to its spell check custom dictionary with document.spellCheckCustomDictionary.addWords(), sorted. Page script cannot read the dictionary back; this lets developers inspect it.
GET_SUB_APPS
Returns the list of installed child Sub-Apps for the inspected parent app.
HANDLE_JAVA_SCRIPT_DIALOG
Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).
NAVIGATE
Navigates current page to the given URL.
NAVIGATE_TO_HISTORY_ENTRY
Navigates current page to the given history entry.
PRINT_TO_PDF
Print page as PDF.
PRODUCE_COMPILATION_CACHE
Requests backend to produce compilation cache for the specified scripts. scripts are appended to the list of scripts for which the cache would be produced. The list may be reset during page navigation. When script with a matching URL is encountered, the cache is optionally produced upon backend discretion, based on internal heuristics. See also: Page.compilationCacheProduced.
RELOAD
Reloads given page optionally ignoring the cache.
REMOVE_SCRIPT_TO_EVALUATE_ON_LOAD
Deprecated, please use removeScriptToEvaluateOnNewDocument instead.
REMOVE_SCRIPT_TO_EVALUATE_ON_NEW_DOCUMENT
Removes given script from the list.
RESET_NAVIGATION_HISTORY
Resets navigation history for the current page.
SCREENCAST_FRAME_ACK
Acknowledges that a screencast frame has been received by the frontend.
SEARCH_IN_RESOURCE
Searches for given string in resource content.
SET_AD_BLOCKING_ENABLED
Enable Chrome’s experimental ad filter on all sites.
SET_BYPASS_CSP
Enable page Content Security Policy by-passing.
SET_DEVICE_METRICS_OVERRIDE
Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and “device-width”/“device-height”-related CSS media query results).
SET_DEVICE_ORIENTATION_OVERRIDE
Overrides the Device Orientation.
SET_DOCUMENT_CONTENT
Sets given markup as the document’s HTML.
SET_DOWNLOAD_BEHAVIOR
Set the behavior when downloading a file.
SET_FONT_FAMILIES
Set generic font families.
SET_FONT_SIZES
Set default font sizes.
SET_GEOLOCATION_OVERRIDE
Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.
SET_INPUT_VISUALIZATION
Configures input visualization on the page.
SET_INTERCEPT_FILE_CHOOSER_DIALOG
Intercept file chooser requests and transfer control to protocol clients. When file chooser interception is enabled, native file chooser dialog is not shown. Instead, a protocol event Page.fileChooserOpened is emitted.
SET_LIFECYCLE_EVENTS_ENABLED
Controls whether page will emit lifecycle events.
SET_PRERENDERING_ALLOWED
Enable/disable prerendering manually. This command is a short-term solution for https://crbug.com/1440085. See https://docs.google.com/document/d/12HVmFxYj5Jc-eJr5OmWsa2bqTJsbgGLKI6ZIyx0_wpA for more details. TODO(https://crbug.com/1440085): Remove this once Puppeteer supports tab targets.
SET_RPH_REGISTRATION_MODE
Extensions for Custom Handlers API: https://html.spec.whatwg.org/multipage/system-state.html#rph-automation
SET_SPC_TRANSACTION_MODE
Sets the Secure Payment Confirmation transaction mode. https://w3c.github.io/secure-payment-confirmation/#sctn-automation-set-spc-transaction-mode
SET_TOUCH_EMULATION_ENABLED
Toggles mouse event-based touch event emulation.
SET_WEB_LIFECYCLE_STATE
Tries to update the web lifecycle state of the page. It will transition the page to the given state according to: https://github.com/WICG/web-lifecycle/
START_SCREENCAST
Starts sending each frame using the screencastFrame event.
START_SCREEN_RECORDING
Starts screencast video recording.
STOP_LOADING
Force the page stop all navigations and pending resource fetches.
STOP_SCREENCAST
Stops sending each frame in the screencastFrame.
STOP_SCREEN_RECORDING
Stops screencast video recording.
WAIT_FOR_DEBUGGER
Pauses page execution. Can be resumed using generic Runtime.runIfWaitingForDebugger.