private void ping(long time, TimeUnit timeUnit) throws UrlChecker.TimeoutException, MalformedURLException { URL status = new URL(url.toString() + "/status"); new UrlChecker().waitUntilAvailable(time, timeUnit, status); }
private void stop() throws IOException { try { new UrlChecker().waitUntilUnavailable(3, SECONDS, new URL(url + "/shutdown")); process.destroy(); } catch (TimeoutException e) { throw new WebDriverException("Driver failed to stop.", e); } } }
private void stop() throws IOException { try { new UrlChecker().waitUntilUnavailable(3, SECONDS, new URL(url + "/shutdown")); process.destroy(); } catch (TimeoutException e) { throw new WebDriverException("Driver failed to stop.", e); } } }
private void ping(long time, TimeUnit timeUnit) throws UrlChecker.TimeoutException, MalformedURLException { URL status = new URL(url.toString() + "/status"); new UrlChecker().waitUntilAvailable(time, timeUnit, status); }
@Override protected void waitUntilAvailable() throws MalformedURLException { try { // Use a longer timeout, because 45 seconds was the default timeout in the predecessor to // XpiDriverService. This has to wait for Firefox to start, not just a service, and some users // may be running tests on really slow machines. URL status = new URL(getUrl(port).toString() + "/status"); new UrlChecker().waitUntilAvailable(45, SECONDS, status); } catch (UrlChecker.TimeoutException e) { throw new WebDriverException("Timed out waiting 45 seconds for Firefox to start.", e); } }
private void start() throws IOException { try { process.executeAsync(); new UrlChecker().waitUntilAvailable(20, SECONDS, new URL(url + "/status")); } catch (TimeoutException e) { process.checkForError(); throw new WebDriverException("Driver failed to start.", e); } }
private void start() throws IOException { try { process.executeAsync(); new UrlChecker().waitUntilAvailable(20, SECONDS, new URL(url + "/status")); } catch (TimeoutException e) { process.checkForError(); throw new WebDriverException("Driver failed to start.", e); } }
new UrlChecker().waitUntilAvailable( 20, TimeUnit.SECONDS, new URL("http://localhost:" + this.port + "/proxy"));