Package org.openqa.selenium

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


     * Selects the rich text area frame. Selectors are relative to the edited document after calling this method.
     */
    public void selectRichTextAreaFrame()
    {
        WebDriver driver = getDriver();
        driver.switchTo().frame(driver.findElement(By.className("gwt-RichTextArea"))).switchTo().activeElement();
    }

    /**
     * Selects the top frame.
     */
 
View Full Code Here


    }

    public void makeFiltering(String filterValue) {
//        selectByLabel(filterValue);
        WebDriver driver = ((WrapsDriver) getSelenium()).getWrappedDriver();
        Select select = new Select(driver.findElement(By.xpath(getXPath())));
        select.selectByVisibleText(filterValue);
        getLoadingMode().waitForLoad();
    }

}
View Full Code Here

    @Test
    public void shouldRenderStatusPage() {
        WebDriver webDriver = new JerseyClientHtmlunitDriver(client);
        webDriver.get("http://localhost");
        assertThat(webDriver.getTitle(), is("Status"));
        assertThat(webDriver.findElement(By.id("accept_header.value")).getText(), is("text/html"));
    }

    @Test
    public void shouldReadCookiesFromRequest() {
        WebDriver webDriver = new JerseyClientHtmlunitDriver(client);
View Full Code Here

        WebDriver webDriver = new JerseyClientHtmlunitDriver(client);
        webDriver.get("http://localhost");
        webDriver.manage().addCookie(new Cookie("cookieone", "valueone", "localhost", "/", null));
        webDriver.get("http://localhost");
        assertThat(webDriver.getTitle(), is("Status"));
        assertThat(webDriver.findElement(By.id("cookie_header.value")).getText(), is("cookieone=valueone;"));
    }

    @Test
    public void shouldReadCookiesFromInChildPage() {
        WebDriver webDriver = new JerseyClientHtmlunitDriver(client);
View Full Code Here

        WebDriver webDriver = new JerseyClientHtmlunitDriver(client);
        webDriver.get("http://localhost");
        webDriver.manage().addCookie(new Cookie("cookieone", "valueone", "localhost", "/", null));
        webDriver.get("http://localhost/cookie");
        assertThat(webDriver.getTitle(), is("Cookie"));
        assertThat(webDriver.findElement(By.id("cookie_header.value")).getText(), is("cookieone=valueone;"));
    }

    @Test
    public void shouldNotSeeCookieFromDifferentDomain() {
        WebDriver webDriver = new JerseyClientHtmlunitDriver(client);
View Full Code Here

        WebDriver webDriver = new JerseyClientHtmlunitDriver(client);
        webDriver.get("http://localhost");
        webDriver.manage().addCookie(new Cookie("cookieone", "valueone", "localhost", "/", null));
        webDriver.get("http://thoughtworks");
        assertThat(webDriver.getTitle(), is("Status"));
        assertThat(webDriver.findElement(By.id("cookie_header.value")).getText(), is(""));
    }

    @Test
    public void shouldNotSeeCookieForDifferentPath() {
        WebDriver webDriver = new JerseyClientHtmlunitDriver(client);
View Full Code Here

        WebDriver webDriver = new JerseyClientHtmlunitDriver(client);
        webDriver.get("http://localhost");
        webDriver.manage().addCookie(new Cookie("cookieone", "valueone", "localhost", "/cookie", null));
        webDriver.get("http://localhost");
        assertThat(webDriver.getTitle(), is("Status"));
        assertThat(webDriver.findElement(By.id("cookie_header.value")).getText(), is(""));
    }

    @Test
    public void ajaxPostShouldShowFormContent() {
        WebDriver webDriver = new JerseyClientHtmlunitDriver(client);
View Full Code Here

    @Test
    public void ajaxPostShouldShowFormContent() {
        WebDriver webDriver = new JerseyClientHtmlunitDriver(client);
        webDriver.get("http://localhost");
        webDriver.findElement(By.id("my-form")).submit();
        assertThat(webDriver.getPageSource(), containsString(DataConstants.AJAX_JSON_DUMMY_DATA_KEY));
        assertThat(webDriver.getPageSource(), containsString(DataConstants.AJAX_JSON_DUMMY_DATA_VALUE));
    }

}
View Full Code Here

       
        //for (TraderInfo ti : traderList) {
                 
          //driver.get(ti.getUrl());
               
                driver.findElement(By.linkText("������")).click();

                Thread.sleep(5000);
               
          String s =  driver.findElement(By.id("table-body-positions")).getText();
         
View Full Code Here

               
                driver.findElement(By.linkText("������")).click();

                Thread.sleep(5000);
               
          String s =  driver.findElement(By.id("table-body-positions")).getText();
         
                System.out.println(s);
               
          t = new TableParser(s);
         
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.