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:
Serializable
Direct Known Subclasses:
BiDiException,ConnectionClosedException,ConnectionFailedException,DetachedShadowRootException,DevToolsException,ErrorHandler.UnknownServerException,HealthCheckFailedException,InsecureCertificateException,InvalidArgumentException,InvalidCookieDomainException,InvalidElementStateException,InvalidSelectorException,JavascriptException,JsonException,MoveTargetOutOfBoundsException,NoSuchDriverException,NoSuchSessionException,NotFoundException,RequestFailedException,ScreenshotException,ScriptTimeoutException,SessionNotCreatedException,StaleElementReferenceException,TimeoutException,UnableToCreateProfileException,UnableToSetCookieException,UnexpectedTagNameException,UnhandledAlertException,UnreachableBrowserException,UnsupportedCommandException

@NullMarkedpublic classWebDriverExceptionextendsRuntimeException
See Also:
  • Field Details

  • Constructor Details

    • WebDriverException

      public WebDriverException()
    • WebDriverException

      public WebDriverException(@NullableString message)
    • WebDriverException

      public WebDriverException(@NullableThrowable cause)
    • WebDriverException

      public WebDriverException(@NullableString message, @NullableThrowable cause)
  • Method Details

    • getMessage

      public @NullableString 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 class Throwable
      Returns:
      the detail message string of this exception.
    • getRawMessage

      public @NullableString getRawMessage()
      Returns the simple message string of this exception.
      Returns:
      the simple message string of this exception.
      See Also:
    • getSystemInformation

      public String getSystemInformation()
    • getHostInformation

      public static String getHostInformation()
    • getSupportUrl

      public @NullableString getSupportUrl()
    • getBuildInformation

      public BuildInfo getBuildInformation()
    • getDriverName

      public static String getDriverName(StackTraceElement[] stackTraceElements)
    • addInfo

      public void addInfo(String key,String value)
    • getAdditionalInformation

      public String getAdditionalInformation()