code: public void launchSelendroid() {
      launchServer();
      if (config.isGrid()) {
        // Longer timeout to allow for grid registration
        HttpClientUtil.waitForServer(server.getPort(), 3, TimeUnit.MINUTES);
      } else {
        HttpClientUtil.waitForServer(server.getPort(), 20, TimeUnit.SECONDS);
      }
    }
docs: Starts the Selendroid standalone server and waits until it's ready to accept requests.
  @throws io.selendroid.server.common.exceptions.SelendroidException if the server didn't come up