Table of Contents

Class TargetAdapter

Namespace
OpenQA.Selenium.DevTools.V132.Target
Assembly
WebDriver.dll

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

public class TargetAdapter
Inheritance
TargetAdapter
Inherited Members

Constructors

TargetAdapter(IDevToolsSession)

Initializes a new instance of the TargetAdapter class.

public TargetAdapter(IDevToolsSession session)

Parameters

session IDevToolsSession

The IDevToolsSession to be used with this adapter.

Properties

Session

Gets the DevToolsSession associated with the adapter.

public IDevToolsSession Session { get; }

Property Value

IDevToolsSession

Methods

ActivateTarget(ActivateTargetCommandSettings, CancellationToken, int?, bool)

activateTarget

public Task<ActivateTargetCommandResponse> ActivateTarget(ActivateTargetCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command ActivateTargetCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<ActivateTargetCommandResponse>

AttachToBrowserTarget(AttachToBrowserTargetCommandSettings, CancellationToken, int?, bool)

attachToBrowserTarget

public Task<AttachToBrowserTargetCommandResponse> AttachToBrowserTarget(AttachToBrowserTargetCommandSettings command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command AttachToBrowserTargetCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<AttachToBrowserTargetCommandResponse>

AttachToTarget(AttachToTargetCommandSettings, CancellationToken, int?, bool)

attachToTarget

public Task<AttachToTargetCommandResponse> AttachToTarget(AttachToTargetCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command AttachToTargetCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<AttachToTargetCommandResponse>

AutoAttachRelated(AutoAttachRelatedCommandSettings, CancellationToken, int?, bool)

autoAttachRelated

public Task<AutoAttachRelatedCommandResponse> AutoAttachRelated(AutoAttachRelatedCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command AutoAttachRelatedCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<AutoAttachRelatedCommandResponse>

CloseTarget(CloseTargetCommandSettings, CancellationToken, int?, bool)

closeTarget

public Task<CloseTargetCommandResponse> CloseTarget(CloseTargetCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command CloseTargetCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<CloseTargetCommandResponse>

CreateBrowserContext(CreateBrowserContextCommandSettings, CancellationToken, int?, bool)

createBrowserContext

public Task<CreateBrowserContextCommandResponse> CreateBrowserContext(CreateBrowserContextCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command CreateBrowserContextCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<CreateBrowserContextCommandResponse>

CreateTarget(CreateTargetCommandSettings, CancellationToken, int?, bool)

createTarget

public Task<CreateTargetCommandResponse> CreateTarget(CreateTargetCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command CreateTargetCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<CreateTargetCommandResponse>

DetachFromTarget(DetachFromTargetCommandSettings, CancellationToken, int?, bool)

detachFromTarget

public Task<DetachFromTargetCommandResponse> DetachFromTarget(DetachFromTargetCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command DetachFromTargetCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<DetachFromTargetCommandResponse>

DisposeBrowserContext(DisposeBrowserContextCommandSettings, CancellationToken, int?, bool)

disposeBrowserContext

public Task<DisposeBrowserContextCommandResponse> DisposeBrowserContext(DisposeBrowserContextCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command DisposeBrowserContextCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<DisposeBrowserContextCommandResponse>

ExposeDevToolsProtocol(ExposeDevToolsProtocolCommandSettings, CancellationToken, int?, bool)

exposeDevToolsProtocol

public Task<ExposeDevToolsProtocolCommandResponse> ExposeDevToolsProtocol(ExposeDevToolsProtocolCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command ExposeDevToolsProtocolCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<ExposeDevToolsProtocolCommandResponse>

GetBrowserContexts(GetBrowserContextsCommandSettings, CancellationToken, int?, bool)

getBrowserContexts

public Task<GetBrowserContextsCommandResponse> GetBrowserContexts(GetBrowserContextsCommandSettings command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetBrowserContextsCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetBrowserContextsCommandResponse>

GetTargetInfo(GetTargetInfoCommandSettings, CancellationToken, int?, bool)

getTargetInfo

public Task<GetTargetInfoCommandResponse> GetTargetInfo(GetTargetInfoCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetTargetInfoCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetTargetInfoCommandResponse>

GetTargets(GetTargetsCommandSettings, CancellationToken, int?, bool)

getTargets

public Task<GetTargetsCommandResponse> GetTargets(GetTargetsCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetTargetsCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetTargetsCommandResponse>

SendMessageToTarget(SendMessageToTargetCommandSettings, CancellationToken, int?, bool)

sendMessageToTarget

public Task<SendMessageToTargetCommandResponse> SendMessageToTarget(SendMessageToTargetCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SendMessageToTargetCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SendMessageToTargetCommandResponse>

SetAutoAttach(SetAutoAttachCommandSettings, CancellationToken, int?, bool)

setAutoAttach

public Task<SetAutoAttachCommandResponse> SetAutoAttach(SetAutoAttachCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetAutoAttachCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetAutoAttachCommandResponse>

SetDiscoverTargets(SetDiscoverTargetsCommandSettings, CancellationToken, int?, bool)

setDiscoverTargets

public Task<SetDiscoverTargetsCommandResponse> SetDiscoverTargets(SetDiscoverTargetsCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetDiscoverTargetsCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetDiscoverTargetsCommandResponse>

SetRemoteLocations(SetRemoteLocationsCommandSettings, CancellationToken, int?, bool)

setRemoteLocations

public Task<SetRemoteLocationsCommandResponse> SetRemoteLocations(SetRemoteLocationsCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetRemoteLocationsCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetRemoteLocationsCommandResponse>

Events

AttachedToTarget

attachedToTarget

public event EventHandler<AttachedToTargetEventArgs> AttachedToTarget

Event Type

EventHandler<AttachedToTargetEventArgs>

DetachedFromTarget

detachedFromTarget

public event EventHandler<DetachedFromTargetEventArgs> DetachedFromTarget

Event Type

EventHandler<DetachedFromTargetEventArgs>

ReceivedMessageFromTarget

receivedMessageFromTarget

public event EventHandler<ReceivedMessageFromTargetEventArgs> ReceivedMessageFromTarget

Event Type

EventHandler<ReceivedMessageFromTargetEventArgs>

TargetCrashed

targetCrashed

public event EventHandler<TargetCrashedEventArgs> TargetCrashed

Event Type

EventHandler<TargetCrashedEventArgs>

TargetCreated

targetCreated

public event EventHandler<TargetCreatedEventArgs> TargetCreated

Event Type

EventHandler<TargetCreatedEventArgs>

TargetDestroyed

targetDestroyed

public event EventHandler<TargetDestroyedEventArgs> TargetDestroyed

Event Type

EventHandler<TargetDestroyedEventArgs>

TargetInfoChanged

targetInfoChanged

public event EventHandler<TargetInfoChangedEventArgs> TargetInfoChanged

Event Type

EventHandler<TargetInfoChangedEventArgs>