Examples of findElement()


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

    private void initialize() {
        openTestURL();
        WebElement dateField = driver.findElement(By.id(DATEFIELD_ID));
        dateFieldButton = dateField.findElement(By
                .className("v-datefield-button"));
        textField = dateField
                .findElement(By.className("v-datefield-textfield"));
        resolutionSecond = driver.findElement(By.id(BUTTON_BASE_ID + "second"));
        resolutionMinute = driver.findElement(By.id(BUTTON_BASE_ID + "minute"));
        resolutionHour = driver.findElement(By.id(BUTTON_BASE_ID + "hour"));
        resolutionDay = driver.findElement(By.id(BUTTON_BASE_ID + "day"));
View Full Code Here

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

        sleep(1000);

        WebElement table = vaadinElementById(TABLE);
        assertFirstRowIdIs("ROW #120");

        testBenchElement(table.findElement(By.className("v-scrollable")))
                .scroll(320 * ROW_HEIGHT);
        sleep(1000);

        assertRowIdIsInThePage("ROW #330");
        assertScrollPositionIsNotVisible();
View Full Code Here

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

        DesiredCapabilities caps = DesiredCapabilities.chrome();
        caps.setCapability("chrome.prefs", preferences);
        caps.setCapability("chrome.switches", Arrays.asList("--user-data-dir=/Users/yihua/temp/chrome"));
        WebDriver webDriver = new ChromeDriver(caps);
        webDriver.get("http://huaban.com/");
        WebElement webElement = webDriver.findElement(By.xpath("/html"));
        System.out.println(webElement.getAttribute("outerHTML"));
        webDriver.close();
    }
}
View Full Code Here

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

         
          // Go to the Google Suggest home page
          driver.get("http://www.google.com/webhp?complete=1&hl=en");
         
          // Enter the query string "Cheese"
          WebElement query = driver.findElement(By.name("q"));
          query.sendKeys("Cheese");

          // Sleep until the div we want is visible or 5 seconds is over
          long end = System.currentTimeMillis() + 5000;
          while (System.currentTimeMillis() < end) {
View Full Code Here

Examples of org.openqa.selenium.htmlunit.HtmlUnitDriver.findElement()

          // And now use this to visit Google
          driver.get("http://www.google.com");

          // Find the text input element by its name
          WebElement element = driver.findElement(By.name("q"));

          // Enter something to search for
          element.sendKeys("Cheese!");

          // Now submit the form. WebDriver will find the form for us from the element
View Full Code Here

Examples of org.openqa.selenium.phantomjs.PhantomJSDriver.findElement()

                "})" +
            "}");

        phantom.get("http://ariya.github.com/js/random/");

        WebElement numbers = phantom.findElement(By.id("numbers"));
        boolean foundAtLeastOne = false;
        for(String number : numbers.getText().split(" ")) {
            foundAtLeastOne = true;
            assertEquals("42", number);
        }
View Full Code Here

Examples of org.openqa.selenium.remote.RemoteWebDriver.findElement()

public class Selenium2Test extends TestCase {
    public void testFoo() throws Exception {
        WebDriver wd = new RemoteWebDriver(new URL("http://127.0.0.1:4444/wd/hub"), DesiredCapabilities.firefox());
        try {
            wd.get("http://www.yahoo.com/");
            wd.findElement(By.name("p")).sendKeys("hello world");
            wd.findElement(By.id("search-submit")).click();
//        wd.waitForPageToLoad("10000");

            assertTrue(wd.getTitle().contains("hello world"));
            assertTrue(wd.getTitle().contains("Yahoo"));
View Full Code Here

Examples of org.openqa.selenium.remote.RemoteWebDriver.findElement()

    public void testFoo() throws Exception {
        WebDriver wd = new RemoteWebDriver(new URL("http://127.0.0.1:4444/wd/hub"), DesiredCapabilities.firefox());
        try {
            wd.get("http://www.yahoo.com/");
            wd.findElement(By.name("p")).sendKeys("hello world");
            wd.findElement(By.id("search-submit")).click();
//        wd.waitForPageToLoad("10000");

            assertTrue(wd.getTitle().contains("hello world"));
            assertTrue(wd.getTitle().contains("Yahoo"));
        } finally {
View Full Code Here

Examples of org.openqa.selenium.support.events.EventFiringWebDriver.findElement()

      driverWithReporting = new EventFiringWebDriver(driver);
      driverWithReporting.register(loggingListener);
    }

    driverWithReporting.get("http://www.google.com");
    WebElement element = driverWithReporting.findElement(By.name("q"));
    element.sendKeys("Mifos");
    element.submit();
   
        (new WebDriverWait(driverWithReporting, 10))
          .until(ExpectedConditions.presenceOfElementLocated(By.id("bfoot")));
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.CrosstabCellBody.findElement()

    {
      throw new IllegalStateException("A crosstab group can never be without a cell body");
    }

    LinkedHashMap<String, DetailsDefinition> details;
    CrosstabCell element = cellBody.findElement(null, null);
    if (element != null)
    {
      details = extractFromDetailCell(element, cellBody.getHeader());
    }
    else
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.