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.
scriptsare 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.fileChooserOpenedis 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
screencastFrameevent. - 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.