Examples of findElements()


Examples of org.openqa.selenium.WebElement.findElements()

     */
    private boolean checkCodeDivs(SampleFrameworkResultPage resultPage) {
        WebElement jspDiv = resultPage.getJspSnippetDiv();
        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

Examples of org.openqa.selenium.WebElement.findElements()

     */
    private boolean checkCodeDivs(SampleFrameworkResultPage resultPage) {
        WebElement jsDiv = resultPage.getJsSnippetDiv();
        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();
View Full Code Here

Examples of org.openqa.selenium.WebElement.findElements()

     *
     * @return
     */
    public List<WebElement> getTableRows() {
        WebElement resultEl = getWebElement();
        return resultEl.findElements(By.tagName("tr"));
    }
   
    /**
     * Return a WebElement for the pager div that was created on this page
     *
 
View Full Code Here

Examples of org.openqa.selenium.chrome.ChromeDriver.findElements()

   
    dr.get(filePath);
    Thread.sleep(1000);
   
//    选择所有的checkbox并全部勾上
    List<WebElement> checkboxes = dr.findElements(By.cssSelector("input[type=checkbox]"));
    for(WebElement checkbox : checkboxes) {
      checkbox.click();
    }
    dr.navigate().refresh();
   
View Full Code Here

Examples of org.openqa.selenium.firefox.FirefoxDriver.findElements()

                break;
              }
          }

          // And now list the suggestions
          List<WebElement> allSuggestions = driver.findElements(By.className("gsq_a"));
         
          for (WebElement suggestion : allSuggestions) {
              System.out.println(suggestion.getText());
          }
       }
View Full Code Here

Examples of org.uiautomation.ios.UIAModels.UIAApplication.findElements()

  }

  @Test
  public void findElementsOnElementTagName() throws InterruptedException {
    UIAApplication app = (UIAApplication) driver.findElement(By.tagName("UIAApplication"));
    List<WebElement> elements = app.findElements(By.tagName("UIATableCell"));
    Assert.assertEquals(elements.size(), 12);
  }

  @Test
  public void findElementsOnElementCriteria() throws InterruptedException {
View Full Code Here

Examples of org.uiautomation.ios.UIAModels.UIAWindow.findElements()

  }

  @Test
  public void findElementsOnElementNoResult() throws InterruptedException {
    UIAWindow window = (UIAWindow) driver.findElement(By.tagName("UIAWindow"));
    List<WebElement> elements = window.findElements(By.tagName("UIAButton"));
    Assert.assertEquals(elements.size(), 0);
  }

  @Test
  public void findElementXpath() throws InterruptedException {
View Full Code Here

Examples of org.uiautomation.ios.drivers.RemoteIOSNativeDriver.findElements()

    Set<String> handles = new HashSet<String>();
    handles.add(WorkingMode.Native.toString());

    RemoteIOSNativeDriver nativeDriver = getNativeDriver();
    if ((nativeDriver.getInstruments() instanceof NoInstrumentsImplementationAvailable) ||
        (nativeDriver.findElements(new TypeCriteria(UIAWebView.class)).size() > 0)) {
      for (WebkitPage page : getWebDriver().getPages()) {
        handles.add(WorkingMode.Web + "_" + page.getPageId());
      }
    }
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.