Skip to main content

Module commands

Module commands 

Source

Structs§

AddCompilationCache
Seeds compilation cache for given url. Compilation cache does not survive cross-process navigation. addCompilationCache
AddCompilationCacheParams
Seeds compilation cache for given url. Compilation cache does not survive cross-process navigation. addCompilationCache
AddScriptToEvaluateOnNewDocument
Evaluates given script in every frame upon creation (before loading frame’s scripts). addScriptToEvaluateOnNewDocument
AddScriptToEvaluateOnNewDocumentParams
Evaluates given script in every frame upon creation (before loading frame’s scripts). addScriptToEvaluateOnNewDocument
BringToFront
Brings page to front (activates tab). bringToFront
BringToFrontParams
Brings page to front (activates tab). bringToFront
CaptureScreenshot
Capture page screenshot. captureScreenshot
CaptureScreenshotParams
Capture page screenshot. captureScreenshot
CaptureSnapshot
Returns a snapshot of the page as a string. For MHTML format, the serialization includes iframes, shadow DOM, external resources, and element-inline styles. captureSnapshot
CaptureSnapshotParams
Returns a snapshot of the page as a string. For MHTML format, the serialization includes iframes, shadow DOM, external resources, and element-inline styles. captureSnapshot
ClearCompilationCache
Clears seeded compilation cache. clearCompilationCache
ClearCompilationCacheParams
Clears seeded compilation cache. clearCompilationCache
Close
Tries to close page, running its beforeunload hooks, if any. close
CloseParams
Tries to close page, running its beforeunload hooks, if any. close
Crash
Crashes renderer on the IO thread, generates minidumps. crash
CrashParams
Crashes renderer on the IO thread, generates minidumps. crash
CreateIsolatedWorld
Creates an isolated world for the given frame. createIsolatedWorld
CreateIsolatedWorldParams
Creates an isolated world for the given frame. createIsolatedWorld
Disable
Disables page domain notifications. disable
DisableParams
Disables page domain notifications. disable
Enable
Enables page domain notifications. enable
EnableParams
Enables page domain notifications. enable
GenerateTestReport
Generates a report for testing. generateTestReport
GenerateTestReportParams
Generates a report for testing. generateTestReport
GetAdScriptAncestry
GetAdScriptAncestryParams
GetAnnotatedPageContent
Get the annotated page content for the main frame. This is an experimental command that is subject to change. getAnnotatedPageContent
GetAnnotatedPageContentParams
Get the annotated page content for the main frame. This is an experimental command that is subject to change. getAnnotatedPageContent
GetAppId
Returns the unique (PWA) app id. Only returns values if the feature flag ‘WebAppEnableManifestId’ is enabled getAppId
GetAppIdParams
Returns the unique (PWA) app id. Only returns values if the feature flag ‘WebAppEnableManifestId’ is enabled getAppId
GetAppManifest
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. getAppManifest
GetAppManifestParams
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. getAppManifest
GetFrameTree
Returns present frame tree structure. getFrameTree
GetFrameTreeParams
Returns present frame tree structure. getFrameTree
GetInstallabilityErrors
GetInstallabilityErrorsParams
GetLayoutMetrics
Returns metrics relating to the layouting of the page, such as viewport bounds/scale. getLayoutMetrics
GetLayoutMetricsParams
Returns metrics relating to the layouting of the page, such as viewport bounds/scale. getLayoutMetrics
GetNavigationHistory
Returns navigation history for the current page. getNavigationHistory
GetNavigationHistoryParams
Returns navigation history for the current page. getNavigationHistory
GetOriginTrials
Get Origin Trials on given frame. getOriginTrials
GetOriginTrialsParams
Get Origin Trials on given frame. getOriginTrials
GetPermissionsPolicyState
Get Permissions Policy state on given frame. getPermissionsPolicyState
GetPermissionsPolicyStateParams
Get Permissions Policy state on given frame. getPermissionsPolicyState
GetResourceContent
Returns content of the given resource. getResourceContent
GetResourceContentParams
Returns content of the given resource. getResourceContent
GetResourceTree
Returns present frame / resource tree structure. getResourceTree
GetResourceTreeParams
Returns present frame / resource tree structure. getResourceTree
HandleJavaScriptDialog
Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload). handleJavaScriptDialog
HandleJavaScriptDialogParams
Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload). handleJavaScriptDialog
Navigate
Navigates current page to the given URL. navigate
NavigateParams
Navigates current page to the given URL. navigate
NavigateToHistoryEntry
Navigates current page to the given history entry. navigateToHistoryEntry
NavigateToHistoryEntryParams
Navigates current page to the given history entry. navigateToHistoryEntry
PrintToPdf
Print page as PDF. printToPDF
PrintToPdfParams
Print page as PDF. printToPDF
ProduceCompilationCache
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. produceCompilationCache
ProduceCompilationCacheParams
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. produceCompilationCache
Reload
Reloads given page optionally ignoring the cache. reload
ReloadParams
Reloads given page optionally ignoring the cache. reload
RemoveScriptToEvaluateOnNewDocument
Removes given script from the list. removeScriptToEvaluateOnNewDocument
RemoveScriptToEvaluateOnNewDocumentParams
Removes given script from the list. removeScriptToEvaluateOnNewDocument
ResetNavigationHistory
Resets navigation history for the current page. resetNavigationHistory
ResetNavigationHistoryParams
Resets navigation history for the current page. resetNavigationHistory
ScreencastFrameAck
Acknowledges that a screencast frame has been received by the frontend. screencastFrameAck
ScreencastFrameAckParams
Acknowledges that a screencast frame has been received by the frontend. screencastFrameAck
SearchInResource
Searches for given string in resource content. searchInResource
SearchInResourceParams
Searches for given string in resource content. searchInResource
SetAdBlockingEnabled
Enable Chrome’s experimental ad filter on all sites. setAdBlockingEnabled
SetAdBlockingEnabledParams
Enable Chrome’s experimental ad filter on all sites. setAdBlockingEnabled
SetBypassCsp
Enable page Content Security Policy by-passing. setBypassCSP
SetBypassCspParams
Enable page Content Security Policy by-passing. setBypassCSP
SetDocumentContent
Sets given markup as the document’s HTML. setDocumentContent
SetDocumentContentParams
Sets given markup as the document’s HTML. setDocumentContent
SetFontFamilies
Set generic font families. setFontFamilies
SetFontFamiliesParams
Set generic font families. setFontFamilies
SetFontSizes
Set default font sizes. setFontSizes
SetFontSizesParams
Set default font sizes. setFontSizes
SetInterceptFileChooserDialog
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. setInterceptFileChooserDialog
SetInterceptFileChooserDialogParams
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. setInterceptFileChooserDialog
SetLifecycleEventsEnabled
Controls whether page will emit lifecycle events. setLifecycleEventsEnabled
SetLifecycleEventsEnabledParams
Controls whether page will emit lifecycle events. setLifecycleEventsEnabled
SetPrerenderingAllowed
Enable/disable prerendering manually.
SetPrerenderingAllowedParams
Enable/disable prerendering manually.
SetRphRegistrationMode
Extensions for Custom Handlers API: https://html.spec.whatwg.org/multipage/system-state.html#rph-automation setRPHRegistrationMode
SetRphRegistrationModeParams
Extensions for Custom Handlers API: https://html.spec.whatwg.org/multipage/system-state.html#rph-automation setRPHRegistrationMode
SetSpcTransactionMode
Sets the Secure Payment Confirmation transaction mode. https://w3c.github.io/secure-payment-confirmation/#sctn-automation-set-spc-transaction-mode setSPCTransactionMode
SetSpcTransactionModeParams
Sets the Secure Payment Confirmation transaction mode. https://w3c.github.io/secure-payment-confirmation/#sctn-automation-set-spc-transaction-mode setSPCTransactionMode
SetWebLifecycleState
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/ setWebLifecycleState
SetWebLifecycleStateParams
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/ setWebLifecycleState
StartScreencast
Starts sending each frame using the screencastFrame event. startScreencast
StartScreencastParams
Starts sending each frame using the screencastFrame event. startScreencast
StopLoading
Force the page stop all navigations and pending resource fetches. stopLoading
StopLoadingParams
Force the page stop all navigations and pending resource fetches. stopLoading
StopScreencast
Stops sending each frame in the screencastFrame. stopScreencast
StopScreencastParams
Stops sending each frame in the screencastFrame. stopScreencast
WaitForDebugger
Pauses page execution. Can be resumed using generic Runtime.runIfWaitingForDebugger. waitForDebugger
WaitForDebuggerParams
Pauses page execution. Can be resumed using generic Runtime.runIfWaitingForDebugger. waitForDebugger

Enums§

AddCompilationCacheMethod
AddScriptToEvaluateOnNewDocumentMethod
BringToFrontMethod
CaptureScreenshotFormat
Image compression format (defaults to png).
CaptureScreenshotMethod
CaptureSnapshotFormat
Format (defaults to mhtml).
CaptureSnapshotMethod
ClearCompilationCacheMethod
CloseMethod
CrashMethod
CreateIsolatedWorldMethod
DisableMethod
EnableMethod
GenerateTestReportMethod
GetAdScriptAncestryMethod
GetAnnotatedPageContentMethod
GetAppIdMethod
GetAppManifestMethod
GetFrameTreeMethod
GetInstallabilityErrorsMethod
GetLayoutMetricsMethod
GetNavigationHistoryMethod
GetOriginTrialsMethod
GetPermissionsPolicyStateMethod
GetResourceContentMethod
GetResourceTreeMethod
HandleJavaScriptDialogMethod
NavigateMethod
NavigateToHistoryEntryMethod
PageCommands
PrintToPdfMethod
PrintToPdfTransferMode
return as stream
ProduceCompilationCacheMethod
ReloadMethod
RemoveScriptToEvaluateOnNewDocumentMethod
ResetNavigationHistoryMethod
ScreencastFrameAckMethod
SearchInResourceMethod
SetAdBlockingEnabledMethod
SetBypassCspMethod
SetDocumentContentMethod
SetFontFamiliesMethod
SetFontSizesMethod
SetInterceptFileChooserDialogMethod
SetLifecycleEventsEnabledMethod
SetPrerenderingAllowedMethod
SetRphRegistrationModeMethod
SetRphRegistrationModeMode
SetSpcTransactionModeMethod
SetSpcTransactionModeMode
SetWebLifecycleStateMethod
SetWebLifecycleStateState
Target lifecycle state
StartScreencastFormat
Image compression format.
StartScreencastMethod
StopLoadingMethod
StopScreencastMethod
WaitForDebuggerMethod