CDPotion.Domain.Browser (cdpotion v0.1.0)
Summary
Functions
Allows a site to use privacy sandbox features that require enrollment without the site actually being enrolled. Only supported on page targets.
Cancel a download if in progress
Close browser gracefully.
Crashes browser on the main thread.
Crashes GPU process.
Invoke custom browser commands used by telemetry.
Returns the command line switches for the browser process if, and only if --enable-automation is on the commandline.
Get a Chrome histogram by name.
Get Chrome histograms.
Returns version information.
Get position and size of the browser window.
Get the browser window that contains the devtools target.
Grant specific permissions to the given origin and reject all others.
Reset all permission management for all origins.
Set dock tile details, platform-specific.
Set the behavior when downloading a file.
Set permission settings for given origin.
Set position and/or size of the browser window.
Functions
add_privacy_sandbox_enrollment_override(url)
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
: description not provided :(
cancel_download(guid, browser_context_id \\ nil)
Cancel a download if in progress
Parameters:
guid:string
: Global unique identifier of the download.browserContextId:BrowserContextID
: (Optional) BrowserContext to perform the action in. When omitted, default browser context is used.
close()
Close browser gracefully.
crash()
Crashes browser on the main thread.
crash_gpu_process()
Crashes GPU process.
execute_browser_command(command_id)
Invoke custom browser commands used by telemetry.
Parameters:
commandId:BrowserCommandId
: description not provided :(
get_browser_command_line()
Returns the command line switches for the browser process if, and only if --enable-automation is on the commandline.
get_histogram(name, delta \\ nil)
Get a Chrome histogram by name.
Parameters:
name:string
: Requested histogram name.delta:boolean
: (Optional) If true, retrieve delta since last delta call.
get_histograms(query \\ nil, delta \\ nil)
Get Chrome histograms.
Parameters:
query:string
: (Optional) 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
: (Optional) If true, retrieve delta since last delta call.
get_version()
Returns version information.
get_window_bounds(window_id)
Get position and size of the browser window.
Parameters:
windowId:WindowID
: Browser window id.
get_window_for_target(target_id \\ nil)
Get the browser window that contains the devtools target.
Parameters:
targetId:Target.TargetID
: (Optional) Devtools agent host id. If called as a part of the session, associated targetId is used.
grant_permissions(permissions, origin \\ nil, browser_context_id \\ nil)
Grant specific permissions to the given origin and reject all others.
Parameters:
permissions:array
: description not provided :(origin:string
: (Optional) Origin the permission applies to, all origins if not specified.browserContextId:BrowserContextID
: (Optional) BrowserContext to override permissions. When omitted, default browser context is used.
reset_permissions(browser_context_id \\ nil)
Reset all permission management for all origins.
Parameters:
browserContextId:BrowserContextID
: (Optional) BrowserContext to reset permissions. When omitted, default browser context is used.
set_dock_tile(badge_label \\ nil, image \\ nil)
Set dock tile details, platform-specific.
Parameters:
badgeLabel:string
: (Optional) description not provided :(image:string
: (Optional) Png encoded image. (Encoded as a base64 string when passed over JSON)
set_download_behavior(behavior, browser_context_id \\ nil, download_path \\ nil, events_enabled \\ nil)
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 dowmload guids.browserContextId:BrowserContextID
: (Optional) BrowserContext to set download behavior. When omitted, default browser context is used.downloadPath:string
: (Optional) The default path to save downloaded files to. This is required if behavior is set to 'allow' or 'allowAndName'.eventsEnabled:boolean
: (Optional) Whether to emit download events (defaults to false).
set_permission(permission, setting, origin \\ nil, browser_context_id \\ nil)
Set permission settings for given origin.
Parameters:
permission:PermissionDescriptor
: Descriptor of permission to override.setting:PermissionSetting
: Setting of the permission.origin:string
: (Optional) Origin the permission applies to, all origins if not specified.browserContextId:BrowserContextID
: (Optional) Context to override. When omitted, default browser context is used.
set_window_bounds(window_id, bounds)
Set position and/or size of the browser window.
Parameters:
windowId:WindowID
: Browser window id.bounds:Bounds
: New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged.