Page Domain
Actions and events related to the inspected page belong to the page domain.
Functions
Seeds compilation cache for given url. Compilation cache does not survive cross-process navigation.
Deprecated, please use addScriptToEvaluateOnNewDocument instead.
Evaluates given script in every frame upon creation (before loading frame's scripts).
Fired for failed bfcache history navigations if BackForwardCache feature is enabled. Do not assume any ordering with the Page.frameNavigated event. This event is fired only for main-frame history navigation where the document changes (non-same-document navigations), when bfcache navigation fails.
Brings page to front (activates tab).
Capture page screenshot.
Captures a screenshot of the current page based on the given options, and stores the resulting image into a new file at the given outputImagePath. If the file already exists, it is overwritten.
Returns a snapshot of the page as a string. For MHTML format, the serialization includes iframes, shadow DOM, external resources, and element-inline styles.
Clears seeded compilation cache.
Clears the overridden device metrics.
Clears the overridden Device Orientation.
Clears the overridden Geolocation Position and Error.
Tries to close page, running its beforeunload hooks, if any.
Issued for every compilation cache generated. Is only available if Page.setGenerateCompilationCache is enabled.
Crashes renderer on the IO thread, generates minidumps.
Creates an isolated world for the given frame.
Deletes browser cookie with given name, domain and path.
Disables page domain notifications.
Fired when opening document to write to.
Fired when download makes progress. Last call has |done| == true. Deprecated. Use Browser.downloadProgress instead.
Fired when page is about to start a download. Deprecated. Use Browser.downloadWillBegin instead.
Enables page domain notifications.
Emitted only when page.interceptFileChooser is enabled.
Fired when frame has been attached to its parent.
Fired when frame no longer has a scheduled navigation.
Fired when frame has been detached from its parent.
Fired once navigation of the frame has completed. Frame is now associated with the new loader.
Fired when a renderer-initiated navigation is requested. Navigation may still be cancelled after the event is issued.
Fired when frame schedules a potential navigation.
Fired when frame has started loading.
Fired when frame has stopped loading.
Generates a report for testing.
Returns the unique (PWA) app id. Only returns values if the feature flag 'WebAppEnableManifestId' is enabled
Returns all browser cookies for the page and all of its subframes. Depending on the backend support, will return detailed cookie information in the cookies field.
Returns present frame tree structure.
Returns metrics relating to the layouting of the page, such as viewport bounds/scale.
Deprecated because it's not guaranteed that the returned icon is in fact the one used for PWA installation.
Returns navigation history for the current page.
Get Origin Trials on given frame.
Get Permissions Policy state on given frame.
Returns content of the given resource.
Returns present frame / resource tree structure.
Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).
Fired when interstitial page was hidden
Fired when interstitial page was shown
Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed.
Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open.
Fired for top level page lifecycle events such as navigation, load, paint, etc.
Navigates current page to the given URL.
Fired when same-document navigation happens, e.g. due to history API usage or anchor navigation.
Navigates current page to the given history entry.
Print page as PDF.
Requests backend to produce compilation cache for the specified scripts. scripts are appeneded 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.
Reloads given page optionally ignoring the cache.
Deprecated, please use removeScriptToEvaluateOnNewDocument instead.
Removes given script from the list.
Resets navigation history for the current page.
Acknowledges that a screencast frame has been received by the frontend.
Compressed image data requested by the startScreencast.
Fired when the page with currently enabled screencast was shown or hidden `.
Searches for given string in resource content.
Enable Chrome's experimental ad filter on all sites.
Enable page Content Security Policy by-passing.
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).
Overrides the Device Orientation.
Sets given markup as the document's HTML.
Set the behavior when downloading a file.
Set generic font families.
Set default font sizes.
Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.
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.
Controls whether page will emit lifecycle events.
Enable/disable prerendering manually.
Extensions for Custom Handlers API: https://html.spec.whatwg.org/multipage/system-state.html#rph-automation
Sets the Secure Payment Confirmation transaction mode. https://w3c.github.io/secure-payment-confirmation/#sctn-automation-set-spc-transaction-mode
Toggles mouse event-based touch event emulation.
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/
Starts sending each frame using the screencastFrame event.
Force the page stop all navigations and pending resource fetches.
Stops sending each frame in the screencastFrame.
Pauses page execution. Can be resumed using generic Runtime.runIfWaitingForDebugger.
Fired when a new window is going to be opened, via window.open(), link click, form submission, etc.