Class AppiumServerAvailabilityChecker
java.lang.Object
io.appium.java_client.service.local.AppiumServerAvailabilityChecker
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanwaitUntilAvailable(URL serverStatusUrl, Duration timeout) Verifies a possibility of establishing a connection to a running Appium server.
-
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 interruptedAppiumServerAvailabilityChecker.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.
-