Chrome DevTools Protocol (original) (raw)
Methods
Browser.addPrivacySandboxCoordinatorKeyConfig#
Configures encryption keys used with a given privacy sandbox API to talk to a trusted coordinator. Since this is intended for test automation only, coordinatorOrigin must be a .test domain. No existing coordinator configuration for the origin may exist.
parameters
api
coordinatorOrigin
string
keyConfig
string
browserContextId
BrowserContext to perform the action in. When omitted, default browser context is used.
Browser.addPrivacySandboxEnrollmentOverride#
Allows a site to use privacy sandbox features that require enrollment without the site actually being enrolled. Only supported on page targets.
parameters
url
string
Browser.close#
Close browser gracefully.
Browser.getVersion#
Returns version information.
Return Object
protocolVersion
string
Protocol version.
product
string
Product name.
revision
string
Product revision.
userAgent
string
User-Agent.
jsVersion
string
V8 version.
Browser.resetPermissions#
Reset all permission management for all origins.
parameters
browserContextId
BrowserContext to reset permissions. When omitted, default browser context is used.
Browser.cancelDownloadExperimental #
Cancel a download if in progress
parameters
guid
string
Global unique identifier of the download.
browserContextId
BrowserContext to perform the action in. When omitted, default browser context is used.
Browser.crashExperimental #
Crashes browser on the main thread.
Browser.crashGpuProcessExperimental #
Crashes GPU process.
Browser.executeBrowserCommandExperimental #
Invoke custom browser commands used by telemetry.
parameters
commandId
Browser.getBrowserCommandLineExperimental #
Returns the command line switches for the browser process if, and only if --enable-automation is on the commandline.
Return Object
arguments
array[ string ]
Commandline parameters
Browser.getHistogramExperimental #
Get a Chrome histogram by name.
parameters
name
string
Requested histogram name.
delta
boolean
If true, retrieve delta since last delta call.
Return Object
histogram
Histogram.
Browser.getHistogramsExperimental #
Get Chrome histograms.
parameters
query
string
Requested substring in name. Only histograms which have query as a substring in their name are extracted. An empty or absent query returns all histograms.
delta
boolean
If true, retrieve delta since last delta call.
Return Object
histograms
array[ Histogram ]
Histograms.
Browser.getWindowBoundsExperimental #
Get position and size of the browser window.
parameters
windowId
Browser window id.
Return Object
bounds
Bounds information of the window. When window state is 'minimized', the restored window position and size are returned.
Browser.getWindowForTargetExperimental #
Get the browser window that contains the devtools target.
parameters
targetId
Devtools agent host id. If called as a part of the session, associated targetId is used.
Return Object
windowId
Browser window id.
bounds
Bounds information of the window. When window state is 'minimized', the restored window position and size are returned.
Browser.grantPermissionsExperimental #
Grant specific permissions to the given origin and reject all others.
parameters
permissions
array[ PermissionType ]
origin
string
Origin the permission applies to, all origins if not specified.
browserContextId
BrowserContext to override permissions. When omitted, default browser context is used.
Browser.setDockTileExperimental #
Set dock tile details, platform-specific.
parameters
badgeLabel
string
image
string
Png encoded image. (Encoded as a base64 string when passed over JSON)
Browser.setDownloadBehaviorExperimental #
Set the behavior when downloading a file.
parameters
behavior
string
Whether to allow all or deny all download requests, or use default Chrome behavior if available (otherwise deny). |allowAndName| allows download and names files according to their download guids.
Allowed Values: deny
, allow
, allowAndName
, default
browserContextId
BrowserContext to set download behavior. When omitted, default browser context is used.
downloadPath
string
The default path to save downloaded files to. This is required if behavior is set to 'allow' or 'allowAndName'.
eventsEnabled
boolean
Whether to emit download events (defaults to false).
Browser.setPermissionExperimental #
Set permission settings for given origin.
parameters
permission
Descriptor of permission to override.
setting
Setting of the permission.
origin
string
Origin the permission applies to, all origins if not specified.
browserContextId
Context to override. When omitted, default browser context is used.
Browser.setWindowBoundsExperimental #
Set position and/or size of the browser window.
parameters
windowId
Browser window id.
bounds
New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged.
Events
Browser.downloadProgressExperimental #
Fired when download makes progress. Last call has |done| == true.
parameters
guid
string
Global unique identifier of the download.
totalBytes
number
Total expected bytes to download.
receivedBytes
number
Total bytes received.
state
string
Download status.
Allowed Values: inProgress
, completed
, canceled
filePath
string
If download is "completed", provides the path of the downloaded file. Depending on the platform, it is not guaranteed to be set, nor the file is guaranteed to exist.
Experimental
Browser.downloadWillBeginExperimental #
Fired when page is about to start a download.
parameters
frameId
Id of the frame that caused the download to begin.
guid
string
Global unique identifier of the download.
url
string
URL of the resource being downloaded.
suggestedFilename
string
Suggested file name of the resource (the actual name of the file saved on disk may differ).
Types
Browser.BoundsExperimental #
Browser window bounds information
Type: object
properties
left
integer
The offset from the left edge of the screen to the window in pixels.
top
integer
The offset from the top edge of the screen to the window in pixels.
width
integer
The window width in pixels.
height
integer
The window height in pixels.
windowState
The window state. Default to normal.
Browser.BrowserCommandIdExperimental #
Browser command ids used by executeBrowserCommand.
Allowed Values: openTabSearch
, closeTabSearch
, openGlic
Type: string
Browser.BrowserContextIDExperimental #
Type: string
Browser.BucketExperimental #
Chrome histogram bucket.
Type: object
properties
low
integer
Minimum value (inclusive).
high
integer
Maximum value (exclusive).
count
integer
Number of samples.
Browser.HistogramExperimental #
Chrome histogram.
Type: object
properties
name
string
Name.
sum
integer
Sum of sample values.
count
integer
Total number of samples.
buckets
array[ Bucket ]
Buckets.
Browser.PermissionDescriptorExperimental #
Type: object
properties
name
string
sysex
boolean
For "midi" permission, may also specify sysex control.
userVisibleOnly
boolean
For "push" permission, may specify userVisibleOnly. Note that userVisibleOnly = true is the only currently supported type.
allowWithoutSanitization
boolean
For "clipboard" permission, may specify allowWithoutSanitization.
allowWithoutGesture
boolean
For "fullscreen" permission, must specify allowWithoutGesture:true.
panTiltZoom
boolean
For "camera" permission, may specify panTiltZoom.
Browser.PermissionSettingExperimental #
Allowed Values: granted
, denied
, prompt
Type: string
Browser.PermissionTypeExperimental #
Allowed Values: ar
, audioCapture
, automaticFullscreen
, backgroundFetch
, backgroundSync
, cameraPanTiltZoom
, capturedSurfaceControl
, clipboardReadWrite
, clipboardSanitizedWrite
, displayCapture
, durableStorage
, geolocation
, handTracking
, idleDetection
, keyboardLock
, localFonts
, localNetworkAccess
, midi
, midiSysex
, nfc
, notifications
, paymentHandler
, periodicBackgroundSync
, pointerLock
, protectedMediaIdentifier
, sensors
, smartCard
, speakerSelection
, storageAccess
, topLevelStorageAccess
, videoCapture
, vr
, wakeLockScreen
, wakeLockSystem
, webAppInstallation
, webPrinting
, windowManagement
Type: string
Browser.PrivacySandboxAPIExperimental #
Allowed Values: BiddingAndAuctionServices
, TrustedKeyValue
Type: string
Browser.WindowIDExperimental #
Type: integer
Browser.WindowStateExperimental #
The state of the browser window.
Allowed Values: normal
, minimized
, maximized
, fullscreen
Type: string