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
infoSerializationInfoSerialization info
contextStreamingContextStreaming context
TargetNotFoundException(string)
Initializes a new instance of the TargetNotFoundException class.
public TargetNotFoundException(string message)
Parameters
messagestringAn exception message
TargetNotFoundException(string, ITarget)
Initializes a new instance of the TargetNotFoundException class.
public TargetNotFoundException(string message, ITarget target)
Parameters
TargetNotFoundException(string, Exception)
Initializes a new instance of the TargetNotFoundException class.
public TargetNotFoundException(string message, Exception inner)
Parameters
TargetNotFoundException(string, Exception, ITarget)
Initializes a new instance of the TargetNotFoundException class.
public TargetNotFoundException(string message, Exception inner, ITarget target)
Parameters
messagestringAn exception message
innerExceptionThe inner exception
targetITargetThe 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
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.