Package org.openqa.selenium.support.ui

Examples of org.openqa.selenium.support.ui.WebDriverWait.until()


        WebElement notification = driver.findElements(By.id("notification")).get(0);
        return notification.getText().equals("Configuration Saved");
      }
    };
    WebDriverWait wait = new WebDriverWait(driver, 10);
    wait.until(isSaved);
  }

  private void copyConfiguration() {

    openConfiguration();
View Full Code Here


        WebElement notification = driver.findElements(By.id("notification")).get(0);
        return notification.getText().equals("Configuration Deleted");
      }
    };
    WebDriverWait wait = new WebDriverWait(driver, 10);
    wait.until(isDeleted);
  }

  private void runConfigurationAndViewResults() {
    openConfiguration();
View Full Code Here

                        "//li[contains(text(),'Crawl Execution Queue')]/following-sibling::li//span[contains(i,'running')]"));
        return running != null;
      }
    };
    WebDriverWait wait = new WebDriverWait(driver, 10);
    wait.until(isRunning);

    ExpectedCondition<Boolean> isComplete = new ExpectedCondition<Boolean>() {
      public Boolean apply(WebDriver driver) {
        WebElement success =
                driver.findElement(By
View Full Code Here

                        "//li[contains(text(),'Crawl Execution Queue')]/following-sibling::li//span[contains(i,'success')]"));
        return success != null;
      }
    };
    wait = new WebDriverWait(driver, 60);
    wait.until(isComplete);

    List<WebElement> crawlHistoryLink = driver.findElements(By.linkText("Crawl History"));
    followLink(crawlHistoryLink.get(0));

    WebElement crawlLink = driver.findElement(By.xpath(
View Full Code Here

          WebElement notification = driver.findElements(By.id("notification")).get(0);
          return notification.getText().equals("Plugin Deleted");
        }
      };
      WebDriverWait wait = new WebDriverWait(driver, 10);
      wait.until(isDeleted);
      if (!isElementPresent(driver, By.linkText("Delete"))) {
        break;
      }
      deleteLinks = driver.findElements(By.linkText("Delete"));
    }
View Full Code Here

        final String errorMsg = "COMPONENT markup://uitest:button_LabelRequiredTest is missing required attribute 'label'";
        openNoAura("/uitest/button_LabelRequiredTest.cmp");
        auraUITestingUtil.waitForDocumentReady();
        WebDriverWait wait = new WebDriverWait(getDriver(), timeoutInSecs);
        wait.withMessage("Required label error not displayed");
        wait.until(new ExpectedCondition<Boolean>() {
            @Override
            public Boolean apply(WebDriver d) {
                return auraUITestingUtil.getQuickFixMessage().contains(errorMsg);
            }
        });
View Full Code Here

        openNoAura("/auratest/testModelThatThrows.cmp");
        auraUITestingUtil.waitForDocumentReady();
        List<WebElement> errorBoxes = getDriver().findElements(By.cssSelector(".auraForcedErrorBox"));
        assertEquals("Renderer element found", 0, errorBoxes.size());
        WebDriverWait wait = new WebDriverWait(getDriver(), timeoutInSecs);
        errorBoxes = wait.until(new ExpectedCondition<List<WebElement>>() {
            @Override
            public List<WebElement> apply(WebDriver d) {
                List<WebElement> errors = getDriver().findElements(By.cssSelector(".auraErrorBox"));
                if (errors.size() > 0 && errors.get(0).isDisplayed()) {
                    return errors;
View Full Code Here

     * Wait for a specified amount of time.
     */
    public void waitFor(long timeoutInSeconds) {
        WebDriverWait wait = new WebDriverWait(getDriver(), timeoutInSeconds);
        try {
            wait.until(new ExpectedCondition<Boolean>() {
                @Override
                public Boolean apply(WebDriver d) {
                    return false;
                }
            });
View Full Code Here

     */
    public void waitForElementAppear(String msg, final By locator) {
        WebDriverWait wait = new WebDriverWait(getDriver(), timeoutInSecs);
        wait.withMessage(msg);
        wait.ignoring(NoSuchElementException.class);
        wait.until(new ExpectedCondition<Boolean>() {
            @Override
            public Boolean apply(WebDriver d) {
                return isElementPresent(locator);
            }
        });
View Full Code Here

     * @param locator By of element waiting for.
     */
    public void waitForElementDisappear(String msg, final By locator) {
        WebDriverWait wait = new WebDriverWait(getDriver(), timeoutInSecs);
        wait.withMessage(msg);
        wait.until(new ExpectedCondition<Boolean>() {
            @Override
            public Boolean apply(WebDriver d) {
                return !isElementPresent(locator);
            }
        });
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.