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
originalNodeRemoteValue
Properties
EqualityContract
protected override Type EqualityContract { get; }
Property Value
Handle
Gets the handle of this RemoteValue.
[JsonPropertyName("handle")]
[JsonInclude]
public string? Handle { get; }
Property Value
InternalId
Gets the internal ID of this RemoteValue.
[JsonPropertyName("internalId")]
[JsonInclude]
public string? InternalId { get; }
Property Value
SharedId
Gets the shared ID of this RemoteValue.
[JsonPropertyName("sharedId")]
[JsonInclude]
public string? SharedId { get; }
Property Value
Value
Gets the NodeProperties value of this remote value.
[JsonPropertyName("value")]
[JsonInclude]
public NodeProperties? Value { get; }
Property Value
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
objobject
Returns
Equals(NodeRemoteValue?)
public virtual bool Equals(NodeRemoteValue? other)
Parameters
otherNodeRemoteValue
Returns
Equals(RemoteValue?)
public override sealed bool Equals(RemoteValue? other)
Parameters
otherRemoteValue
Returns
GetHashCode()
public override int GetHashCode()
Returns
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
builderStringBuilder
Returns
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
Operators
operator ==(NodeRemoteValue?, NodeRemoteValue?)
public static bool operator ==(NodeRemoteValue? left, NodeRemoteValue? right)
Parameters
leftNodeRemoteValuerightNodeRemoteValue
Returns
operator !=(NodeRemoteValue?, NodeRemoteValue?)
public static bool operator !=(NodeRemoteValue? left, NodeRemoteValue? right)
Parameters
leftNodeRemoteValuerightNodeRemoteValue