Table of Contents

Class BrowsingContext

Namespace
OpenQA.Selenium.BiDi.BrowsingContext
Assembly
Selenium.WebDriver.dll
[JsonConverter(typeof(BrowsingContext.Converter))]
public sealed record BrowsingContext : IIdentifiable, IEquatable<BrowsingContext>
Inheritance
BrowsingContext
Implements
Inherited Members

Constructors

BrowsingContext(IBiDi, string)

public BrowsingContext(IBiDi bidi, string id)

Parameters

bidi IBiDi
id string

Properties

BiDi

[JsonIgnore]
public IBiDi BiDi { get; }

Property Value

IBiDi

DomContentLoaded

[JsonIgnore]
public IEventSource<DomContentLoadedEventArgs> DomContentLoaded { get; }

Property Value

IEventSource<DomContentLoadedEventArgs>

DownloadEnd

[JsonIgnore]
public IEventSource<DownloadEndEventArgs> DownloadEnd { get; }

Property Value

IEventSource<DownloadEndEventArgs>

DownloadWillBegin

[JsonIgnore]
public IEventSource<DownloadWillBeginEventArgs> DownloadWillBegin { get; }

Property Value

IEventSource<DownloadWillBeginEventArgs>

FragmentNavigated

[JsonIgnore]
public IEventSource<FragmentNavigatedEventArgs> FragmentNavigated { get; }

Property Value

IEventSource<FragmentNavigatedEventArgs>

HistoryUpdated

[JsonIgnore]
public IEventSource<HistoryUpdatedEventArgs> HistoryUpdated { get; }

Property Value

IEventSource<HistoryUpdatedEventArgs>

Id

public string Id { get; }

Property Value

string

Input

[JsonIgnore]
public IBrowsingContextInputModule Input { get; }

Property Value

IBrowsingContextInputModule

Load

[JsonIgnore]
public IEventSource<LoadEventArgs> Load { get; }

Property Value

IEventSource<LoadEventArgs>

Log

[JsonIgnore]
public IBrowsingContextLogModule Log { get; }

Property Value

IBrowsingContextLogModule

NavigationAborted

[JsonIgnore]
public IEventSource<NavigationAbortedEventArgs> NavigationAborted { get; }

Property Value

IEventSource<NavigationAbortedEventArgs>

NavigationCommitted

[JsonIgnore]
public IEventSource<NavigationCommittedEventArgs> NavigationCommitted { get; }

Property Value

IEventSource<NavigationCommittedEventArgs>

NavigationFailed

[JsonIgnore]
public IEventSource<NavigationFailedEventArgs> NavigationFailed { get; }

Property Value

IEventSource<NavigationFailedEventArgs>

NavigationStarted

[JsonIgnore]
public IEventSource<NavigationStartedEventArgs> NavigationStarted { get; }

Property Value

IEventSource<NavigationStartedEventArgs>

Network

[JsonIgnore]
public IBrowsingContextNetworkModule Network { get; }

Property Value

IBrowsingContextNetworkModule

Script

[JsonIgnore]
public IBrowsingContextScriptModule Script { get; }

Property Value

IBrowsingContextScriptModule

Storage

[JsonIgnore]
public IBrowsingContextStorageModule Storage { get; }

Property Value

IBrowsingContextStorageModule

Methods

ActivateAsync(ActivateOptions?, CancellationToken)

public Task<ActivateResult> ActivateAsync(ActivateOptions? options = null, CancellationToken cancellationToken = default)

Parameters

options ActivateOptions
cancellationToken CancellationToken

Returns

Task<ActivateResult>

CaptureScreenshotAsync(CaptureScreenshotOptions?, CancellationToken)

public Task<CaptureScreenshotResult> CaptureScreenshotAsync(CaptureScreenshotOptions? options = null, CancellationToken cancellationToken = default)

Parameters

options CaptureScreenshotOptions
cancellationToken CancellationToken

Returns

Task<CaptureScreenshotResult>

CloseAsync(CloseOptions?, CancellationToken)

public Task<CloseResult> CloseAsync(CloseOptions? options = null, CancellationToken cancellationToken = default)

Parameters

options CloseOptions
cancellationToken CancellationToken

Returns

Task<CloseResult>

Equals(BrowsingContext?)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(BrowsingContext? other)

Parameters

other BrowsingContext

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

GetTreeAsync(ContextGetTreeOptions?, CancellationToken)

public Task<GetTreeResult> GetTreeAsync(ContextGetTreeOptions? options = null, CancellationToken cancellationToken = default)

Parameters

options ContextGetTreeOptions
cancellationToken CancellationToken

Returns

Task<GetTreeResult>

HandleUserPromptAsync(HandleUserPromptOptions?, CancellationToken)

public Task<HandleUserPromptResult> HandleUserPromptAsync(HandleUserPromptOptions? options = null, CancellationToken cancellationToken = default)

Parameters

options HandleUserPromptOptions
cancellationToken CancellationToken

Returns

Task<HandleUserPromptResult>

LocateNodesAsync(Locator, LocateNodesOptions?, CancellationToken)

public Task<LocateNodesResult> LocateNodesAsync(Locator locator, LocateNodesOptions? options = null, CancellationToken cancellationToken = default)

Parameters

locator Locator
options LocateNodesOptions
cancellationToken CancellationToken

Returns

Task<LocateNodesResult>

NavigateAsync(string, NavigateOptions?, CancellationToken)

public Task<NavigateResult> NavigateAsync(string url, NavigateOptions? options = null, CancellationToken cancellationToken = default)

Parameters

url string
options NavigateOptions
cancellationToken CancellationToken

Returns

Task<NavigateResult>

PrintAsync(PrintOptions?, CancellationToken)

public Task<PrintResult> PrintAsync(PrintOptions? options = null, CancellationToken cancellationToken = default)

Parameters

options PrintOptions
cancellationToken CancellationToken

Returns

Task<PrintResult>

ReloadAsync(ReloadOptions?, CancellationToken)

public Task<ReloadResult> ReloadAsync(ReloadOptions? options = null, CancellationToken cancellationToken = default)

Parameters

options ReloadOptions
cancellationToken CancellationToken

Returns

Task<ReloadResult>

SetViewportAsync(ContextSetViewportOptions?, CancellationToken)

public Task<SetViewportResult> SetViewportAsync(ContextSetViewportOptions? options = null, CancellationToken cancellationToken = default)

Parameters

options ContextSetViewportOptions
cancellationToken CancellationToken

Returns

Task<SetViewportResult>

TraverseHistoryAsync(int, TraverseHistoryOptions?, CancellationToken)

public Task<TraverseHistoryResult> TraverseHistoryAsync(int delta, TraverseHistoryOptions? options = null, CancellationToken cancellationToken = default)

Parameters

delta int
options TraverseHistoryOptions
cancellationToken CancellationToken

Returns

Task<TraverseHistoryResult>