Table of Contents

Class TargetNotFoundException

Namespace
CSF.Screenplay.Selenium.Elements
Assembly
CSF.Screenplay.Selenium.dll

Thrown when GetElement(IWebDriver) is used, but no element can be found.

[Serializable]
public class TargetNotFoundException : Exception, ISerializable, IFormattableValue
Inheritance
TargetNotFoundException
Implements
Inherited Members

Constructors

TargetNotFoundException()

Initializes a new instance of the TargetNotFoundException class.

public TargetNotFoundException()

TargetNotFoundException(SerializationInfo, StreamingContext)

Initializes a new instance of the TargetNotFoundException class.

protected TargetNotFoundException(SerializationInfo info, StreamingContext context)

Parameters

info SerializationInfo

Serialization info

context StreamingContext

Streaming context

TargetNotFoundException(string)

Initializes a new instance of the TargetNotFoundException class.

public TargetNotFoundException(string message)

Parameters

message string

An exception message

TargetNotFoundException(string, ITarget)

Initializes a new instance of the TargetNotFoundException class.

public TargetNotFoundException(string message, ITarget target)

Parameters

message string

An exception message

target ITarget

The target for which no element could be found

TargetNotFoundException(string, Exception)

Initializes a new instance of the TargetNotFoundException class.

public TargetNotFoundException(string message, Exception inner)

Parameters

message string

An exception message

inner Exception

The inner exception

TargetNotFoundException(string, Exception, ITarget)

Initializes a new instance of the TargetNotFoundException class.

public TargetNotFoundException(string message, Exception inner, ITarget target)

Parameters

message string

An exception message

inner Exception

The inner exception

target ITarget

The target for which no element could be found

Properties

Target

Gets the target for which no element could not be found.

public ITarget Target { get; }

Property Value

ITarget

Methods

FormatForReport()

Gets a human-readable formatted string which represents the current object instance, suitable to be used in a Screenplay report.

public string FormatForReport()

Returns

string

A formatted string which represents the current instance.