Table of Contents

Class NoSuchElementException

Namespace
OpenQA.Selenium
Assembly
WebDriver.dll

The exception that is thrown when an element is not found.

[Serializable]
public class NoSuchElementException : NotFoundException, ISerializable
Inheritance
NoSuchElementException
Implements
Inherited Members

Constructors

NoSuchElementException()

Initializes a new instance of the NoSuchElementException class.

public NoSuchElementException()

NoSuchElementException(string?)

Initializes a new instance of the NoSuchElementException class with a specified error message.

public NoSuchElementException(string? message)

Parameters

message string

The message that describes the error.

NoSuchElementException(string?, Exception?)

Initializes a new instance of the NoSuchElementException class with a specified error message and a reference to the inner exception that is the cause of this exception.

public NoSuchElementException(string? message, Exception? innerException)

Parameters

message string

The error message that explains the reason for the exception.

innerException Exception

The exception that is the cause of the current exception, or null if no inner exception is specified.

Methods

GetMessage(string?)

Add information about obtaining additional support from documentation to this exception.

protected static string GetMessage(string? message)

Parameters

message string

The original message for exception

Returns

string

The final message for exception