Class AppiumServerAvailabilityChecker

java.lang.Object
io.appium.java_client.service.local.AppiumServerAvailabilityChecker

public class AppiumServerAvailabilityChecker extends Object
  • Constructor Details

    • AppiumServerAvailabilityChecker

      public AppiumServerAvailabilityChecker()
  • Method Details

    • waitUntilAvailable

      public boolean waitUntilAvailable(URL serverStatusUrl, Duration timeout) throws InterruptedException
      Verifies a possibility of establishing a connection to a running Appium server.
      Parameters:
      serverStatusUrl - The URL of /status endpoint.
      timeout - Wait timeout. If the server responds with non-200 error code then we are not going to retry, but throw an exception immediately.
      Returns:
      true in case of success
      Throws:
      InterruptedException - If the API is interrupted
      AppiumServerAvailabilityChecker.ConnectionTimeout - If it is not possible to successfully open an HTTP connection to the server's /status endpoint.
      AppiumServerAvailabilityChecker.ConnectionError - If an HTTP connection was opened successfully, but non-200 error code was received.