Table of Contents

Class AdsAdapter

Namespace
OpenQA.Selenium.DevTools.V154.Ads
Assembly
Selenium.WebDriver.dll

Represents an adapter for the Ads domain to simplify the command interface.

public class AdsAdapter
Inheritance
AdsAdapter
Inherited Members

Constructors

AdsAdapter(IDevToolsSession)

Initializes a new instance of the AdsAdapter class.

public AdsAdapter(IDevToolsSession session)

Parameters

session IDevToolsSession

The IDevToolsSession to be used with this adapter.

Exceptions

ArgumentNullException

If session is null.

Properties

Session

Gets the DevToolsSession associated with the adapter.

public IDevToolsSession Session { get; }

Property Value

IDevToolsSession

Methods

GetAdMetrics(GetAdMetricsCommandSettings?, CancellationToken, int?, bool)

Retrieves ad metrics for the current page.

public Task<GetAdMetricsCommandResponse> GetAdMetrics(GetAdMetricsCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetAdMetricsCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetAdMetricsCommandResponse>

GetAdScripts(GetAdScriptsCommandSettings?, CancellationToken, int?, bool)

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).

public Task<GetAdScriptsCommandResponse> GetAdScripts(GetAdScriptsCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetAdScriptsCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetAdScriptsCommandResponse>