Package org.openqa.selenium
Class WebDriverException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.openqa.selenium.WebDriverException
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
HealthCheckFailedException
,InvalidArgumentException
,InvalidCookieDomainException
,InvalidElementStateException
,JavascriptException
,MoveTargetOutOfBoundsException
,NoSuchSessionException
,NotFoundException
,ScriptTimeoutException
,SessionNotCreatedException
,StaleElementReferenceException
,TimeoutException
,UnableToSetCookieException
,UnhandledAlertException
,UnsupportedCommandException
public class WebDriverException extends java.lang.RuntimeException
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
BASE_SUPPORT_URL
static java.lang.String
DRIVER_INFO
static java.lang.String
SESSION_ID
-
Constructor Summary
Constructors Constructor Description WebDriverException()
WebDriverException(java.lang.String message)
WebDriverException(java.lang.String message, java.lang.Throwable cause)
WebDriverException(java.lang.Throwable cause)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addInfo(java.lang.String key, java.lang.String value)
java.lang.String
getAdditionalInformation()
BuildInfo
getBuildInformation()
static java.lang.String
getDriverName(java.lang.StackTraceElement[] stackTraceElements)
static java.lang.String
getHostInformation()
java.lang.String
getMessage()
Returns the detail message string of this exception that includes not only the original message passed to the exception constructor but also driver information, system information and extra information added byaddInfo(String, String)
method.java.lang.String
getRawMessage()
Returns the simple message string of this exception.java.lang.String
getSupportUrl()
java.lang.String
getSystemInformation()
-
-
-
Field Detail
-
SESSION_ID
public static final java.lang.String SESSION_ID
- See Also:
- Constant Field Values
-
DRIVER_INFO
public static final java.lang.String DRIVER_INFO
- See Also:
- Constant Field Values
-
BASE_SUPPORT_URL
protected static final java.lang.String BASE_SUPPORT_URL
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
WebDriverException
public WebDriverException()
-
WebDriverException
public WebDriverException(java.lang.String message)
-
WebDriverException
public WebDriverException(java.lang.Throwable cause)
-
WebDriverException
public WebDriverException(java.lang.String message, java.lang.Throwable cause)
-
-
Method Detail
-
getMessage
public java.lang.String getMessage()
Returns the detail message string of this exception that includes not only the original message passed to the exception constructor but also driver information, system information and extra information added byaddInfo(String, String)
method. To get the original message usegetRawMessage()
- Overrides:
getMessage
in classjava.lang.Throwable
- Returns:
- the detail message string of this exception.
-
getRawMessage
public java.lang.String getRawMessage()
Returns the simple message string of this exception.- Returns:
- the simple message string of this exception.
- See Also:
getMessage()
-
getSystemInformation
public java.lang.String getSystemInformation()
-
getHostInformation
public static java.lang.String getHostInformation()
-
getSupportUrl
public java.lang.String getSupportUrl()
-
getBuildInformation
public BuildInfo getBuildInformation()
-
getDriverName
public static java.lang.String getDriverName(java.lang.StackTraceElement[] stackTraceElements)
-
addInfo
public void addInfo(java.lang.String key, java.lang.String value)
-
getAdditionalInformation
public java.lang.String getAdditionalInformation()
-
-