Table of Contents

Class NodeRemoteValue

Namespace
WebDriverBiDi.Script
Assembly
WebDriverBiDi.dll

Represents a remote value for a DOM node, providing type-safe access to the NodeProperties value and the ability to convert to a local value for use as an argument for script execution on the remote end.

public record NodeRemoteValue : RemoteValue, IEquatable<RemoteValue>, IObjectReferenceRemoteValue, ITypeSafeRemoteValue<NodeProperties?>, IEquatable<NodeRemoteValue>
Inheritance
NodeRemoteValue
Implements
Inherited Members

Constructors

NodeRemoteValue(NodeRemoteValue)

protected NodeRemoteValue(NodeRemoteValue original)

Parameters

original NodeRemoteValue

Properties

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

Handle

Gets the handle of this RemoteValue.

[JsonPropertyName("handle")]
[JsonInclude]
public string? Handle { get; }

Property Value

string

InternalId

Gets the internal ID of this RemoteValue.

[JsonPropertyName("internalId")]
[JsonInclude]
public string? InternalId { get; }

Property Value

string

SharedId

Gets the shared ID of this RemoteValue.

[JsonPropertyName("sharedId")]
[JsonInclude]
public string? SharedId { get; }

Property Value

string

Value

Gets the NodeProperties value of this remote value.

[JsonPropertyName("value")]
[JsonInclude]
public NodeProperties? Value { get; }

Property Value

NodeProperties

Remarks

This value may be null if the remote value was deserialized without a value property.

Methods

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

Equals(NodeRemoteValue?)

public virtual bool Equals(NodeRemoteValue? other)

Parameters

other NodeRemoteValue

Returns

bool

Equals(RemoteValue?)

public override sealed bool Equals(RemoteValue? other)

Parameters

other RemoteValue

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

GetNodeProperties()

Gets the properties of the node represented by the Value property.

public NodeProperties GetNodeProperties()

Returns

NodeProperties

The NodeProperties object representing the node.

Remarks

The Value property may be null if the remote value was deserialized without a value property. This method provides a way to avoid having to check for null when using the Value property.

Exceptions

WebDriverBiDiException

Thrown if the node properties are not returned from the remote end.

PrintMembers(StringBuilder)

protected override bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToLocalValue()

Converts this remote value to a local value for use as an argument for script execution on the remote end.

public override LocalValue ToLocalValue()

Returns

LocalValue

A LocalValue representing the DOM node.

ToRemoteObjectReference()

Converts this RemoteValue into a RemoteObjectReference.

public RemoteObjectReference ToRemoteObjectReference()

Returns

RemoteObjectReference

The RemoteObjectReference object representing this RemoteValue.

Exceptions

WebDriverBiDiException

Thrown when there is no handle set.

ToSharedReference()

Converts this RemoteValue to a SharedReference.

public SharedReference ToSharedReference()

Returns

SharedReference

The SharedReference object representing this RemoteValue.

Exceptions

WebDriverBiDiException

Thrown if this RemoteValue cannot be converted to a SharedReference.

ToString()

public override string ToString()

Returns

string

Operators

operator ==(NodeRemoteValue?, NodeRemoteValue?)

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

Parameters

left NodeRemoteValue
right NodeRemoteValue

Returns

bool

operator !=(NodeRemoteValue?, NodeRemoteValue?)

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

Parameters

left NodeRemoteValue
right NodeRemoteValue

Returns

bool