Package com.thoughtworks.selenium

Examples of com.thoughtworks.selenium.Wait


        // Switch to source tab but don't wait for the conversion result.
        switchToSource(false);
        // Switch back to WYSIWYG tab.
        switchToWysiwyg();
        // Wait for the conversion result on the WYSIWYG tab.
        new Wait()
        {
            public boolean until()
            {
                return getSourceText().length() > 1;
            }
View Full Code Here


        setSourceText(sourceText);
        // Switch to WYSIWYG tab but don't wait for the rich text area to load.
        switchToWysiwyg(false);
        // Switch back to source tab and wait there for the rich text area to load.
        switchToSource();
        new Wait()
        {
            public boolean until()
            {
                return !isElementPresent("//div[@class = 'xRichTextEditor']//div[@class = 'loading']");
            }
View Full Code Here

        getSelenium().waitForCondition(condition, "" + WAIT_TIME);
    }

    public void waitForTextPresent(final String elementLocator, final String expectedValue)
    {
        new Wait()
        {
            public boolean until()
            {
                return getSelenium().getText(elementLocator).equals(expectedValue);
            }
View Full Code Here

            : "Element [" + elementLocator + "] found but it doesn't have the expected value [" + expectedValue + "]");
    }

    public void waitForTextContains(final String elementLocator, final String containsValue)
    {
        new Wait()
        {
            public boolean until()
            {
                return getSelenium().getText(elementLocator).indexOf(containsValue) > -1;
            }
View Full Code Here

            + "]");
    }

    public void waitForBodyContains(final String containsValue)
    {
        new Wait()
        {
            public boolean until()
            {
                return getSelenium().getBodyText().indexOf(containsValue) > -1;
            }
View Full Code Here

        }.wait("Body text doesn't contain the value [" + containsValue + "]");
    }

    public void waitForElement(final String elementLocator)
    {
        new Wait()
        {
            public boolean until()
            {
                return getSelenium().isElementPresent(elementLocator);
            }
View Full Code Here

    /**
     * Wait for the step selector to load.
     */
    private void waitForStepSelector()
    {
        new Wait()
        {
            public boolean until()
            {
                return getSelenium().isElementPresent(
                    "//table[contains(@class, 'xStepsTabs') and not(contains(@class, 'loading'))]");
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

    return elementFound;
  }
 
  //waitFor_ methods
  public boolean waitForEditable(String locator) {
    Wait w = new WaitForElementToBeEditable(locator);
    try {
      w.wait("Element " + locator + " not editable after " + timeoutSeconds + " seconds", Long.parseLong(timeoutMilliseconds));
    }
    catch (SeleniumException e) {
      if (isKnownSeleniumBug(e)) {
        waitForEditable(locator);
      }
View Full Code Here

TOP

Related Classes of com.thoughtworks.selenium.Wait

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.