Class UnhandledAlertException
The exception that is thrown when an unhandled alert is present.
public class UnhandledAlertException : WebDriverException, ISerializable
- Inheritance
-
UnhandledAlertException
- Implements
- Inherited Members
Constructors
UnhandledAlertException()
Initializes a new instance of the UnhandledAlertException class.
public UnhandledAlertException()
UnhandledAlertException(SerializationInfo, StreamingContext)
Initializes a new instance of the UnhandledAlertException class with serialized data.
protected UnhandledAlertException(SerializationInfo info, StreamingContext context)
Parameters
info
SerializationInfoThe SerializationInfo that holds the serialized object data about the exception being thrown.
context
StreamingContextThe StreamingContext that contains contextual information about the source or destination.
UnhandledAlertException(string)
Initializes a new instance of the UnhandledAlertException class with a specified error message.
public UnhandledAlertException(string message)
Parameters
message
stringThe message that describes the error.
UnhandledAlertException(string, Exception)
Initializes a new instance of the UnhandledAlertException class with a specified error message and a reference to the inner exception that is the cause of this exception.
public UnhandledAlertException(string message, Exception innerException)
Parameters
message
stringThe error message that explains the reason for the exception.
innerException
ExceptionThe exception that is the cause of the current exception, or null if no inner exception is specified.
UnhandledAlertException(string, string)
Initializes a new instance of the UnhandledAlertException class with a specified error message and alert text.
public UnhandledAlertException(string message, string alertText)
Parameters
message
stringThe message that describes the error.
alertText
stringThe text of the unhandled alert.
Properties
Alert
Gets the IAlert that has not been handled.
[Obsolete("Use the AlertText property to get the alert of an already dismised alert, or use SwitchTo().Alert() to handle an unhandled alert.")]
public IAlert Alert { get; }
Property Value
AlertText
Gets the text of the unhandled alert.
public string AlertText { get; }
Property Value
Methods
GetObjectData(SerializationInfo, StreamingContext)
Populates a SerializationInfo with the data needed to serialize the target object.
public override void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
info
SerializationInfoThe SerializationInfo that holds the serialized object data about the exception being thrown.
context
StreamingContextThe StreamingContext that contains contextual information about the source or destination.