Package com.thoughtworks.selenium

Examples of com.thoughtworks.selenium.Wait$WaitTimedOutException


    }
    return true;
  }
 
  public boolean waitForElementPresent(String locator) {
    Wait w = new WaitForElementToAppear(locator);
    try {
      w.wait("Cannot find element " +locator+ " after "+timeoutSeconds+" seconds", Long.parseLong(timeoutMilliseconds));
    }
    catch (SeleniumException e) {
      if (isKnownSeleniumBug(e)) {
        waitForElementPresent(locator);
      }
View Full Code Here


    }
    return true;
  }
 
  public boolean waitForElementNotPresent(String locator) {
    Wait w = new WaitForElementToDisappear(locator);
    try {
      w.wait("Element " +locator+ " still present after "+timeoutSeconds+" seconds", Long.parseLong(timeoutMilliseconds));
    }
    catch (SeleniumException e) {
      if (isKnownSeleniumBug(e)) {
        waitForElementNotPresent(locator);
      }
View Full Code Here

    }
    return true;
  }
 
  public boolean waitForVisible(String locator) {
    Wait x=new WaitForElementToBeVisible(locator);
    try {
      x.wait("Element " + locator + " not visible after " + timeoutSeconds + " seconds", Long.parseLong(timeoutMilliseconds));
    }
    catch (SeleniumException e) {
          if (isKnownSeleniumBug(e)) {
            waitForVisible(locator);
          }
View Full Code Here

        }
        return true;
  }
 
  public boolean waitForNotVisible(String locator) {
    Wait x=new WaitForElementToBeInvisible(locator);
    try {
      x.wait("Element " + locator + " still visible after " + timeoutSeconds + " seconds", Long.parseLong(timeoutMilliseconds));
    }
    catch (SeleniumException e) {
          if (isKnownSeleniumBug(e)) {
            waitForNotVisible(locator);
          }
View Full Code Here

        }
        return true;
  }
 
  public boolean waitForTextPresent(String text){
        Wait x=new WaitForTextToAppear(text);
        try {
          x.wait("Cannot find text " +text+ " after "+timeoutSeconds+" seconds", Long.parseLong(timeoutMilliseconds));
        }
        catch (SeleniumException e) {
          if (isKnownSeleniumBug(e)) {
            waitForTextPresent(text);
          }
View Full Code Here

        }
        return true;
  }
 
  public boolean waitForTextNotPresent(String text){
    Wait x=new WaitForTextToDisappear(text);
    try {
          x.wait("Text " +text+ " still present after "+timeoutSeconds+" seconds", Long.parseLong(timeoutMilliseconds));
        }
        catch (SeleniumException e) {
          if (isKnownSeleniumBug(e)) {
            waitForTextNotPresent(text);
          }
View Full Code Here

        }
        return true;
  }
 
  public boolean waitForSelectedLabel(String selectLocator, String label) {
    Wait x=new WaitForLabelToBeSelected(selectLocator, label);
    boolean elementFound = seleniumInstance.isElementPresent(selectLocator);
    if (elementFound) {
      try {
        x.wait("Option with label " +label+ " not selected in " + selectLocator + " after " + timeoutSeconds
            + " seconds", Long.parseLong(timeoutMilliseconds));
      }
      catch (SeleniumException e) {
            if (isKnownSeleniumBug(e)) {
              waitForSelectedLabel(selectLocator, label);
View Full Code Here

    @Override
    public Void execute(final Context context, String... args) {
        final String script = args[ARG_SCRIPT];
        final String timeout = args[ARG_TIMEOUT];
        new Wait() {
            @Override
            public boolean until() {
                Object result = context.getEval().eval(context.getWrappedDriver(), script);
                if (result == null) {
                    return false;
View Full Code Here

     *
     * @param count the number of selected macros to wait for
     */
    public void waitForSelectedMacroCount(final int count)
    {
        new Wait()
        {
            public boolean until()
            {
                return count == getSelectedMacroCount();
            }
View Full Code Here

     * @param present {@code true} to wait for the specified macro to be present, {@code false} to wait for it to be
     *            hidden
     */
    public void waitForMacroListItem(final String macroName, final boolean present)
    {
        new Wait()
        {
            public boolean until()
            {
                return present == getSelenium().isElementPresent(getMacroListItemLocator(macroName));
            }
View Full Code Here

TOP

Related Classes of com.thoughtworks.selenium.Wait$WaitTimedOutException

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.