Package org.openqa.selenium.support.ui

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


    WebDriverWait wait = new WebDriverWait(driver, 10);

    WebElement user = wait.until(ExpectedConditions.presenceOfElementLocated(By.cssSelector("input[type=\"text\"]")));
    user.sendKeys("demo");

    WebElement password= wait.until(ExpectedConditions.presenceOfElementLocated(By.cssSelector("input[type=\"password\"]")));
    password.sendKeys("demo");

    WebElement submit = wait.until(ExpectedConditions.presenceOfElementLocated(By.cssSelector("button[type=\"submit\"]")));
    submit.submit();
View Full Code Here


    user.sendKeys("demo");

    WebElement password= wait.until(ExpectedConditions.presenceOfElementLocated(By.cssSelector("input[type=\"password\"]")));
    password.sendKeys("demo");

    WebElement submit = wait.until(ExpectedConditions.presenceOfElementLocated(By.cssSelector("button[type=\"submit\"]")));
    submit.submit();

//    String xpathExpression = "//td[contains(text(),'Assign Approver')]";
//    WebElement found = wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(xpathExpression)));
//    assertNotNull(found);
View Full Code Here

          .get(0);
      usernameEl.sendKeys(username);
      if (continueButton!=null) {
        continueButton.click();
        WebDriverWait wait = new WebDriverWait(webDriver, 10);
        WebElement element = wait.until(
                ExpectedConditions.visibilityOfElementLocated(By.id(submitId)));
      }
      passwordEl.sendKeys(password);
      submitEl.click();
    } else {
View Full Code Here

        String jspContent = jspDiv.getAttribute("innerHTML");
        WebElement ulNav = resultPage.getCodeNav();
        List<WebElement> tabList = ulNav.findElements(By.xpath(".//a"));
        WebDriverWait wait = new WebDriverWait(resultPage.getWebDriver(), 2);
        tabList.get(1).click();
        boolean docDivDisplayed = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(SampleFrameworkResultPage.DOCSNIPPETDIV))).isDisplayed();

        return jspContent != null && docDivDisplayed;
    }
}
View Full Code Here

        String jsContent = jsDiv.getAttribute("innerHTML");
        WebElement ulNav = resultPage.getCodeNav();
        List<WebElement> tabList = ulNav.findElements(By.xpath(".//a"));
        WebDriverWait wait = new WebDriverWait(resultPage.getWebDriver(), 5l);
        tabList.get(1).click();
        boolean htmlDivDisplayed = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(SampleFrameworkResultPage.HTMLSNIPPETDIV))).isDisplayed();
        tabList.get(2).click();
        boolean cssDivDisplayed = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(SampleFrameworkResultPage.CSSSNIPPETDIV))).isDisplayed();
        tabList.get(3).click();
        boolean docDivDisplayed = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(SampleFrameworkResultPage.DOCSNIPPETDIV))).isDisplayed();
View Full Code Here

        List<WebElement> tabList = ulNav.findElements(By.xpath(".//a"));
        WebDriverWait wait = new WebDriverWait(resultPage.getWebDriver(), 5l);
        tabList.get(1).click();
        boolean htmlDivDisplayed = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(SampleFrameworkResultPage.HTMLSNIPPETDIV))).isDisplayed();
        tabList.get(2).click();
        boolean cssDivDisplayed = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(SampleFrameworkResultPage.CSSSNIPPETDIV))).isDisplayed();
        tabList.get(3).click();
        boolean docDivDisplayed = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(SampleFrameworkResultPage.DOCSNIPPETDIV))).isDisplayed();

        return jsContent != null && htmlDivDisplayed && cssDivDisplayed && docDivDisplayed;
    }
View Full Code Here

        tabList.get(1).click();
        boolean htmlDivDisplayed = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(SampleFrameworkResultPage.HTMLSNIPPETDIV))).isDisplayed();
        tabList.get(2).click();
        boolean cssDivDisplayed = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(SampleFrameworkResultPage.CSSSNIPPETDIV))).isDisplayed();
        tabList.get(3).click();
        boolean docDivDisplayed = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(SampleFrameworkResultPage.DOCSNIPPETDIV))).isDisplayed();

        return jsContent != null && htmlDivDisplayed && cssDivDisplayed && docDivDisplayed;
    }
}
View Full Code Here

     * @param snippetId - the sample framework page
     * @return true if displayed
     */
    public boolean checkIframe(SampleFrameworkResultPage resultPage) {
        WebDriverWait wait = new WebDriverWait(resultPage.getWebDriver(), 20l);
        WebElement iframeBody = wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("body")));
        String bodyClass = iframeBody.getAttribute("class");
       
        return bodyClass != null;
    }
  
View Full Code Here

   *
   * @return the WebElement
   */
  public WebElement waitForCommunityCardNav(){
    WebDriverWait wait = new WebDriverWait(getWebDriver(), 5);
    WebElement result = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("bizCardNav"))); // wait until the community card nav is available.
   
    return result;
  }
 
  public List<WebElement> getCardDivs(){
View Full Code Here

    WebDriver driver = getWebDriver();
   
    new Actions(driver).moveToElement(cardAttachPoint).perform(); // hover over the attachpoint to make the semtagmenu appear.
   
    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")));
   
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.