pub struct BrowserClient { /* private fields */ }Expand description
Client for Browser domain commands.
Implementations§
Source§impl BrowserClient
impl BrowserClient
Sourcepub async fn set_permission(
&self,
params: SetPermissionParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn set_permission( &self, params: SetPermissionParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Set permission settings for given embedding and embedded origins.
Sourcepub async fn grant_permissions(
&self,
params: GrantPermissionsParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn grant_permissions( &self, params: GrantPermissionsParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Grant specific permissions to the given origin and reject all others. Deprecated. Use setPermission instead.
Sourcepub async fn reset_permissions(
&self,
params: ResetPermissionsParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn reset_permissions( &self, params: ResetPermissionsParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Reset all permission management for all origins.
Sourcepub async fn set_download_behavior(
&self,
params: SetDownloadBehaviorParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn set_download_behavior( &self, params: SetDownloadBehaviorParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Set the behavior when downloading a file.
Sourcepub async fn cancel_download(
&self,
params: CancelDownloadParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn cancel_download( &self, params: CancelDownloadParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Cancel a download if in progress
Sourcepub async fn close(&self, session_id: Option<&str>) -> Result<Value, CdpError>
pub async fn close(&self, session_id: Option<&str>) -> Result<Value, CdpError>
Close browser gracefully.
Sourcepub async fn crash(&self, session_id: Option<&str>) -> Result<Value, CdpError>
pub async fn crash(&self, session_id: Option<&str>) -> Result<Value, CdpError>
Crashes browser on the main thread.
Sourcepub async fn crash_gpu_process(
&self,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn crash_gpu_process( &self, session_id: Option<&str>, ) -> Result<Value, CdpError>
Crashes GPU process.
Sourcepub async fn get_version(
&self,
session_id: Option<&str>,
) -> Result<GetVersionReturns, CdpError>
pub async fn get_version( &self, session_id: Option<&str>, ) -> Result<GetVersionReturns, CdpError>
Returns version information.
Sourcepub async fn get_browser_command_line(
&self,
session_id: Option<&str>,
) -> Result<GetBrowserCommandLineReturns, CdpError>
pub async fn get_browser_command_line( &self, session_id: Option<&str>, ) -> Result<GetBrowserCommandLineReturns, CdpError>
Returns the command line switches for the browser process if, and only if –enable-automation is on the commandline.
Sourcepub async fn get_histograms(
&self,
params: GetHistogramsParams,
session_id: Option<&str>,
) -> Result<GetHistogramsReturns, CdpError>
pub async fn get_histograms( &self, params: GetHistogramsParams, session_id: Option<&str>, ) -> Result<GetHistogramsReturns, CdpError>
Get Chrome histograms.
Sourcepub async fn get_histogram(
&self,
params: GetHistogramParams,
session_id: Option<&str>,
) -> Result<GetHistogramReturns, CdpError>
pub async fn get_histogram( &self, params: GetHistogramParams, session_id: Option<&str>, ) -> Result<GetHistogramReturns, CdpError>
Get a Chrome histogram by name.
Sourcepub async fn get_window_bounds(
&self,
params: GetWindowBoundsParams,
session_id: Option<&str>,
) -> Result<GetWindowBoundsReturns, CdpError>
pub async fn get_window_bounds( &self, params: GetWindowBoundsParams, session_id: Option<&str>, ) -> Result<GetWindowBoundsReturns, CdpError>
Get position and size of the browser window.
Sourcepub async fn get_window_for_target(
&self,
params: GetWindowForTargetParams,
session_id: Option<&str>,
) -> Result<GetWindowForTargetReturns, CdpError>
pub async fn get_window_for_target( &self, params: GetWindowForTargetParams, session_id: Option<&str>, ) -> Result<GetWindowForTargetReturns, CdpError>
Get the browser window that contains the devtools target.
Sourcepub async fn set_window_bounds(
&self,
params: SetWindowBoundsParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn set_window_bounds( &self, params: SetWindowBoundsParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Set position and/or size of the browser window.
Sourcepub async fn set_contents_size(
&self,
params: SetContentsSizeParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn set_contents_size( &self, params: SetContentsSizeParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Set size of the browser contents resizing browser window as necessary.
Sourcepub async fn set_dock_tile(
&self,
params: SetDockTileParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn set_dock_tile( &self, params: SetDockTileParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Set dock tile details, platform-specific.
Sourcepub async fn execute_browser_command(
&self,
params: ExecuteBrowserCommandParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn execute_browser_command( &self, params: ExecuteBrowserCommandParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Invoke custom browser commands used by telemetry.
Sourcepub async fn add_privacy_sandbox_enrollment_override(
&self,
params: AddPrivacySandboxEnrollmentOverrideParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn add_privacy_sandbox_enrollment_override( &self, params: AddPrivacySandboxEnrollmentOverrideParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Allows a site to use privacy sandbox features that require enrollment without the site actually being enrolled. Only supported on page targets.
Sourcepub async fn add_privacy_sandbox_coordinator_key_config(
&self,
params: AddPrivacySandboxCoordinatorKeyConfigParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn add_privacy_sandbox_coordinator_key_config( &self, params: AddPrivacySandboxCoordinatorKeyConfigParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
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.