Class AppiumServerAvailabilityChecker


  • public class AppiumServerAvailabilityChecker
    extends java.lang.Object
    • Constructor Detail

      • AppiumServerAvailabilityChecker

        public AppiumServerAvailabilityChecker()
    • Method Detail

      • waitUntilAvailable

        public boolean waitUntilAvailable​(java.net.URL serverStatusUrl,
                                          java.time.Duration timeout)
                                   throws java.lang.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:
        java.lang.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.