Package org.openqa.selenium

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


    if (!environment.isDebugTransport()) {
      return;
    }

    WebDriver webDriver = environment.getCurrentDriver();
    WebElement mockData = webDriver.findElement(By.id("mockData"));
    if (mockData != null) {
      Trace.log(mockData.getText());
    }
  }
View Full Code Here


        // then
        try {
            driver.manage();
            driver.navigate();
            driver.switchTo();
            driver.findElement(By.className(""));
            driver.findElements(By.className(""));
            driver.getWindowHandles();

            options.ime();
            options.logs();
View Full Code Here

        WebDriver driverProxy = GrapheneProxy.getProxyForTargetWithInterfaces(context, driver, WebDriver.class);
        GrapheneProxyInstance proxy = (GrapheneProxyInstance) driverProxy;

        proxy.registerInterceptor(builtInterceptor);
        driverProxy.findElement(by);

        Mockito.inOrder(interceptor1, interceptor2);
        verify(interceptor1).intercept(Mockito.any(InvocationContext.class));
        verify(interceptor2).intercept(Mockito.any(InvocationContext.class));
    }
View Full Code Here

          // 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

         
          // 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

          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) {
              WebElement resultsDiv = driver.findElement(By.className("gsq_a"));

              // If results have been returned, the results are displayed in a drop down.
              if (resultsDiv.isDisplayed()) {
                break;
              }
View Full Code Here

        driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

        // page 1
        driver.get("http://twitter.com/#!/search-home");
        driver.findElement(By.xpath("//div[text() = 'Search']/../../input")).sendKeys("#WebPerfSD");

        // "page 2"
        driver.findElement(By.xpath("//div[text() = 'Search']")).click();
        driver.findElement(By.cssSelector(".tweet")); // wait for next page & tweets to appear
View Full Code Here

        // page 1
        driver.get("http://twitter.com/#!/search-home");
        driver.findElement(By.xpath("//div[text() = 'Search']/../../input")).sendKeys("#WebPerfSD");

        // "page 2"
        driver.findElement(By.xpath("//div[text() = 'Search']")).click();
        driver.findElement(By.cssSelector(".tweet")); // wait for next page & tweets to appear

        // **************************************
        Thread.sleep(5000); // chill
        // **************************************
 
View Full Code Here

        driver.get("http://twitter.com/#!/search-home");
        driver.findElement(By.xpath("//div[text() = 'Search']/../../input")).sendKeys("#WebPerfSD");

        // "page 2"
        driver.findElement(By.xpath("//div[text() = 'Search']")).click();
        driver.findElement(By.cssSelector(".tweet")); // wait for next page & tweets to appear

        // **************************************
        Thread.sleep(5000); // chill
        // **************************************

 
View Full Code Here

        // start capture
        proxy.newHar("twitter.com");

        // page 1
        driver.get("http://twitter.com/#!/search-home");
        driver.findElement(By.xpath("//div[text() = 'Search']/../../input")).sendKeys("#WebPerfSD");

        // "page 2"
        driver.findElement(By.xpath("//div[text() = 'Search']")).click();
        driver.findElement(By.cssSelector(".tweet")); // wait for next page & tweets to appear
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.