Table of Contents

Class SharedReference

Namespace
WebDriverBiDi.Script
Assembly
WebDriverBiDi.dll

Object containing a remote reference to an object in the browser containing a shared ID, such as a node.

public record SharedReference : RemoteReference, IEquatable<LocalValue>, IEquatable<RemoteReference>, IEquatable<SharedReference>
Inheritance
SharedReference
Implements
Inherited Members

Constructors

SharedReference(string)

Initializes a new instance of the SharedReference class.

[JsonConstructor]
public SharedReference(string sharedId)

Parameters

sharedId string

The shared ID of the remote object.

Exceptions

ArgumentNullException

Thrown when sharedId is null.

SharedReference(SharedReference)

protected SharedReference(SharedReference original)

Parameters

original SharedReference

Properties

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

Handle

Gets or sets the handle of the remote object.

[JsonPropertyName("handle")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Handle { get; set; }

Property Value

string

SharedId

Gets or sets the shared ID of the remote object.

[JsonPropertyName("sharedId")]
[JsonRequired]
public string SharedId { get; set; }

Property Value

string

Exceptions

ArgumentNullException

Thrown if setting the value to null.

Methods

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

Equals(RemoteReference?)

public override sealed bool Equals(RemoteReference? other)

Parameters

other RemoteReference

Returns

bool

Equals(SharedReference?)

public virtual bool Equals(SharedReference? other)

Parameters

other SharedReference

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected override bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

Operators

operator ==(SharedReference?, SharedReference?)

public static bool operator ==(SharedReference? left, SharedReference? right)

Parameters

left SharedReference
right SharedReference

Returns

bool

operator !=(SharedReference?, SharedReference?)

public static bool operator !=(SharedReference? left, SharedReference? right)

Parameters

left SharedReference
right SharedReference

Returns

bool