Table of Contents

Class ErrorResult

Namespace
WebDriverBiDi
Assembly
WebDriverBiDi.dll

Object containing an error response to a command.

public record ErrorResult : CommandResult, IEquatable<CommandResult>, IEquatable<ErrorResult>
Inheritance
ErrorResult
Implements
Inherited Members

Constructors

ErrorResult(ErrorResult)

protected ErrorResult(ErrorResult original)

Parameters

original ErrorResult

Properties

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

ErrorCode

Gets the error code of error encountered.

public ErrorCode ErrorCode { get; }

Property Value

ErrorCode

ErrorMessage

Gets the message of the error.

public string ErrorMessage { get; }

Property Value

string

ErrorType

Gets the type of error encountered.

public string ErrorType { get; }

Property Value

string

IsError

Gets a value indicating whether the response data is an error.

public override bool IsError { get; }

Property Value

bool

StackTrace

Gets the stack trace associated with this error.

public string? StackTrace { get; }

Property Value

string

Methods

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

Equals(CommandResult?)

public override sealed bool Equals(CommandResult? other)

Parameters

other CommandResult

Returns

bool

Equals(ErrorResult?)

public virtual bool Equals(ErrorResult? other)

Parameters

other ErrorResult

Returns

bool

FromErrorInformation(string, string, string?)

Creates an ErrorResult object from the given error information.

public static ErrorResult FromErrorInformation(string errorType, string errorMessage, string? stackTrace = null)

Parameters

errorType string

The type of the error.

errorMessage string

The message of the error.

stackTrace string

The stack trace associated with the error.

Returns

ErrorResult

An ErrorResult object containing the error information.

Remarks

This method can be used to create an ErrorResult for use with WebDriverBiDiCommandException when an error is encountered for custom commands. This allows users to create extension methods that mimic the behavior of built-in commands.

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 ==(ErrorResult?, ErrorResult?)

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

Parameters

left ErrorResult
right ErrorResult

Returns

bool

operator !=(ErrorResult?, ErrorResult?)

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

Parameters

left ErrorResult
right ErrorResult

Returns

bool