Table of Contents

Interface IAds

Namespace
Selenium.WebDriver.BiDi.Cdp.Ads
Assembly
Selenium.WebDriver.BiDi.Cdp.dll

A domain for ad-related metrics and data.

[Experimental("BIDICDP001")]
public interface IAds

Methods

GetAdMetricsAsync(string?, CancellationToken)

Retrieves ad metrics for the current page.

Task<GetAdMetricsResult> GetAdMetricsAsync(string? session = null, CancellationToken cancellationToken = default)

Parameters

session string

Optional CDP session override.

cancellationToken CancellationToken

A token to cancel the asynchronous operation.

Returns

Task<GetAdMetricsResult>

A task representing the asynchronous operation, containing a GetAdMetricsResult.

GetAdScriptsAsync(string?, CancellationToken)

Retrieves ad scripts for the current page. To minimize payload size, this only returns the newly tracked ad scripts since the last call to getAdScripts (i.e., the delta).

Task<GetAdScriptsResult> GetAdScriptsAsync(string? session = null, CancellationToken cancellationToken = default)

Parameters

session string

Optional CDP session override.

cancellationToken CancellationToken

A token to cancel the asynchronous operation.

Returns

Task<GetAdScriptsResult>

A task representing the asynchronous operation, containing a GetAdScriptsResult.