Class ErrorCodesMobile

java.lang.Object
org.openqa.selenium.remote.ErrorCodes
io.appium.java_client.ErrorCodesMobile

public class ErrorCodesMobile extends org.openqa.selenium.remote.ErrorCodes
Defines common error codes for the mobile JSON wire protocol.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     

    Fields inherited from class org.openqa.selenium.remote.ErrorCodes

    ASYNC_SCRIPT_TIMEOUT, ELEMENT_CLICK_INTERCEPTED, ELEMENT_NOT_INTERACTABLE, INVALID_ARGUMENT, INVALID_COOKIE_DOMAIN, INVALID_ELEMENT_STATE, INVALID_SELECTOR_ERROR, INVALID_XPATH_SELECTOR, INVALID_XPATH_SELECTOR_RETURN_TYPER, JAVASCRIPT_ERROR, METHOD_NOT_ALLOWED, MOVE_TARGET_OUT_OF_BOUNDS, NO_ALERT_PRESENT, NO_SUCH_COOKIE, NO_SUCH_ELEMENT, NO_SUCH_FRAME, NO_SUCH_SESSION, NO_SUCH_SHADOW_ROOT, NO_SUCH_WINDOW, SESSION_NOT_CREATED, STALE_ELEMENT_REFERENCE, SUCCESS, SUCCESS_STRING, TIMEOUT, UNABLE_TO_CAPTURE_SCREEN, UNABLE_TO_SET_COOKIE, UNEXPECTED_ALERT_PRESENT, UNHANDLED_ERROR, UNKNOWN_COMMAND, XPATH_LOOKUP_ERROR
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Class<? extends org.openqa.selenium.WebDriverException>
    getExceptionType(int statusCode)
    Returns the exception type that corresponds to the given statusCode.
    Class<? extends org.openqa.selenium.WebDriverException>
    Returns the exception type that corresponds to the given messageor null if there are no matching mobile exceptions.
    int
    Converts a thrown error into the corresponding status code.

    Methods inherited from class org.openqa.selenium.remote.ErrorCodes

    getHttpStatusCode, isMappableError, toState, toStatus

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • ErrorCodesMobile

      public ErrorCodesMobile()
  • Method Details

    • getExceptionType

      public Class<? extends org.openqa.selenium.WebDriverException> getExceptionType(int statusCode)
      Returns the exception type that corresponds to the given statusCode. All unrecognized status codes will be mapped to WebDriverException.class.
      Overrides:
      getExceptionType in class org.openqa.selenium.remote.ErrorCodes
      Parameters:
      statusCode - The status code to convert.
      Returns:
      The exception type that corresponds to the provided status
    • getExceptionType

      public Class<? extends org.openqa.selenium.WebDriverException> getExceptionType(String message)
      Returns the exception type that corresponds to the given messageor null if there are no matching mobile exceptions.
      Overrides:
      getExceptionType in class org.openqa.selenium.remote.ErrorCodes
      Parameters:
      message - message An error message returned by Appium server
      Returns:
      The exception type that corresponds to the provided error message or null if there are no matching mobile exceptions.
    • toStatusCode

      public int toStatusCode(Throwable thrown)
      Converts a thrown error into the corresponding status code.
      Overrides:
      toStatusCode in class org.openqa.selenium.remote.ErrorCodes
      Parameters:
      thrown - The thrown error.
      Returns:
      The corresponding status code for the given thrown error.