Package org.openqa.selenium

Examples of org.openqa.selenium.TimeoutException


                // Do nothing just break out
                break;
            }
        }
        getUtil().takeScreenshot();
        throw new TimeoutException("Livetable isn't ready after the timeout has expired. Source ["
            + getDriver().getPageSource() + "]");
    }
View Full Code Here


                return super.until(isTrue);
            } else {
                try {
                    return super.until(isTrue);
                } catch (TimeoutException e) {
                    throw new TimeoutException(message, e);
                }
            }
        }
View Full Code Here

    int cpt = 0;
    while (!isReady) {
      cpt++;
      if (cpt > 20) {
        isReady = true;
        throw new TimeoutException("doc not ready.");
      }
      try {
        Thread.sleep(250);
      } catch (InterruptedException e) {
        log.log(Level.FINE,"",e);
View Full Code Here

    long start = System.currentTimeMillis();
    long deadLine = start + timeout;
    while (!pageLoaded) {
      if (System.currentTimeMillis() > deadLine) {
        // TODO freynaud check for alert while page loads.
        throw new TimeoutException("failed to load the page after " + timeout + " ms.");
      }
      try {
        Thread.sleep(50);
      } catch (InterruptedException e) {
        // ignore
View Full Code Here

  }

  private void waitForDocumentReady(long deadLine) {
    while (!isReady()) {
      if (System.currentTimeMillis() > deadLine) {
        throw new TimeoutException("failed to load the page");
      }
    }
  }
View Full Code Here

  public void waitForLoadEvent() {
    try {
      eventsLock.lock();
      pageLoadEvent.await(30, TimeUnit.SECONDS);
    } catch (InterruptedException e) {
      throw new TimeoutException("timeout waiting for page load event.");
    } finally {
      eventsLock.unlock();
    }
  }
View Full Code Here

  private RemoteWebElement retrieveDocumentAndCheckReady(long deadline) {
    RemoteWebElement element = null;
    String readyState = "";
    while (!readyState.equals("complete")) {
      if (deadline > 0 && System.currentTimeMillis() > deadline) {
        throw new TimeoutException("Timeout waiting to get the document.");
      }
      try {
        log.fine("trying to get the document");
        element = retrieveDocument();
        log.fine("got it");
View Full Code Here

            "return arguments[0][0];",
            new JSONArray().put(new JSONObject().put("objectId", resultObjectId))
          ));
        } else {
          if (System.currentTimeMillis() > whenToTimeout) {
            throw new TimeoutException("Timeout waiting for async script callback.");
          }
        }
      }

      return realResult;
View Full Code Here

  private void waitFor(Future<? extends WebServer> server) {
    long startTime = System.currentTimeMillis();
    while (System.currentTimeMillis() - startTime < 10000) {
      if (server.isCancelled()) {
        throw new TimeoutException("Timed out waiting for server to start");
      }
      if (server.isDone()) {
        return;
      }
    }
    throw new TimeoutException("Timed out waiting for server to start");
  }
View Full Code Here

      if (ignoredException.isInstance(e)) {
        return e;
      }
    }

    throw new TimeoutException(e);
  }
View Full Code Here

TOP

Related Classes of org.openqa.selenium.TimeoutException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.