Class SharedReferenceInfo
- Namespace
- WebDriverBiDi.Script
- Assembly
- WebDriverBiDi.dll
Provides information about a received reference to a remote object identified by a shared ID, such as a node. Use ToSharedReference() to obtain a mutable SharedReference that can be passed as an argument to subsequent commands.
public record SharedReferenceInfo : IEquatable<SharedReferenceInfo>
- Inheritance
-
SharedReferenceInfo
- Implements
- Inherited Members
Constructors
SharedReferenceInfo(SharedReferenceInfo)
protected SharedReferenceInfo(SharedReferenceInfo original)
Parameters
originalSharedReferenceInfo
Properties
AdditionalData
Gets the read-only dictionary of additional properties received with this reference.
[JsonIgnore]
public ReceivedDataDictionary AdditionalData { get; }
Property Value
Remarks
The protocol defines script.SharedReference as extensible, so a remote end may place
vendor-specific properties beside sharedId and handle. They are preserved here, and
ToSharedReference() copies them into the AdditionalData of
the reference it returns so that they are sent back to the remote end with the reference.
EqualityContract
protected virtual Type EqualityContract { get; }
Property Value
Handle
Gets the handle of the remote object, if any.
[JsonPropertyName("handle")]
[JsonInclude]
public string? Handle { get; }
Property Value
SharedId
Gets the shared ID of the remote object.
[JsonPropertyName("sharedId")]
[JsonRequired]
[JsonInclude]
public string SharedId { get; }
Property Value
Methods
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
Equals(SharedReferenceInfo?)
public virtual bool Equals(SharedReferenceInfo? other)
Parameters
otherSharedReferenceInfo
Returns
GetHashCode()
public override int GetHashCode()
Returns
PrintMembers(StringBuilder)
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
builderStringBuilder
Returns
ToSharedReference()
Converts this received reference to a mutable SharedReference for use as an argument to subsequent commands. Any additional properties received with this reference are copied to the AdditionalData of the returned reference.
public SharedReference ToSharedReference()
Returns
- SharedReference
A SharedReference representing this reference.
ToString()
public override string ToString()
Returns
Operators
operator ==(SharedReferenceInfo?, SharedReferenceInfo?)
public static bool operator ==(SharedReferenceInfo? left, SharedReferenceInfo? right)
Parameters
leftSharedReferenceInforightSharedReferenceInfo
Returns
operator !=(SharedReferenceInfo?, SharedReferenceInfo?)
public static bool operator !=(SharedReferenceInfo? left, SharedReferenceInfo? right)
Parameters
leftSharedReferenceInforightSharedReferenceInfo