Package org.openqa.selenium.support.ui

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


    WebDriverWait wait = new WebDriverWait(driver, 5);
    WebElement semtagmenu = wait.until(ExpectedConditions.elementToBeClickable(By.id("semtagmenu"))); // wait until the hover menu is clickable.
   
    WebElement semTagHoverMenu = semtagmenu.findElement(By.xpath(".//a"));
    new Actions(driver).click(semTagHoverMenu).perform(); // click the hovering menu
    WebElement vCardDiv = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("cardDiv")));
   
    return vCardDiv.isDisplayed();
  }
}
View Full Code Here


    if (found == null || found.size() == 0 || found.size() > 1) {
      return false;
    }
    found.get(0).click();
    WebDriverWait webDriverWait = new WebDriverWait(getDriver(), 1);
    webDriverWait.until(new Exp.RepoListViewLoaded());
    return true;
  }
}
View Full Code Here

      return false;
    }
    found.get(0).click();
    WebDriverWait webDriverWait = new WebDriverWait(getDriver(),
        waitSecToLoad);
    webDriverWait.until(new Exp.EditRepoViewLoaded());
    return true;
  }

  private boolean checkOrDoEditRepo(String fullyQualifiedRepoName,
      boolean doEdit) {
View Full Code Here

  public boolean navigateToEditRepo(String fullyQualifiedRepoName,
      int waitSecToLoad) {
    boolean result = checkOrDoEditRepo(fullyQualifiedRepoName, true);
    WebDriverWait webDriverWait = new WebDriverWait(getDriver(),
        waitSecToLoad);
    webDriverWait.until(new Exp.EditRepoViewLoaded());
    return result;
  }

  public boolean isEditableRepo(String fullyQualifiedRepoName) {
    return checkOrDoEditRepo(fullyQualifiedRepoName, false);
View Full Code Here

  public static final String WICKET_HREF_PAGE_PATH = "wicket:bookmarkablePage=:"
      + WICKET_PAGES_PACKAGE_NAME;

  synchronized public void waitToLoadFor(int sec) {
    WebDriverWait webDriverWait = new WebDriverWait(getDriver(), sec);
    webDriverWait.until(new ExpectedCondition<Boolean>() {
      public Boolean apply(WebDriver d) {
        return d.getTitle().toLowerCase()
            .startsWith(GitblitDashboardView.TITLE_STARTS_WITH);
      }
    });
View Full Code Here

    final String fetchedUrl = server.whereIs("redirect");
    driver.navigate().to(fetchedUrl);

    // Wait for redirect
    Wait<WebDriver> wait = new WebDriverWait(driver, OperaIntervals.PAGE_LOAD_TIMEOUT.getMs());
    wait.until(new ExpectedCondition<Object>() {
      public Boolean apply(WebDriver driver) {
        return !driver.getCurrentUrl().equals(fetchedUrl);
      }
    });
View Full Code Here

        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

            "return $(\"li:contains('Crawl Execution Queue')\").parent().find(\"li:contains('running')\")[0];");
        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 = (WebElement) ((JavascriptExecutor)driver).executeScript(
            "return $(\"li:contains('Crawl Execution Queue')\").parent().find(\"li > span:contains('" + CONFIG_NAME + "')\").parent().find(\"i:contains('success')\")[0];");
View Full Code Here

            "return $(\"li:contains('Crawl Execution Queue')\").parent().find(\"li > span:contains('" + CONFIG_NAME + "')\").parent().find(\"i:contains('success')\")[0];");
        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 = (WebElement) ((JavascriptExecutor)driver).executeScript(
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.