Examples of findElement()


Examples of org.openqa.selenium.WebDriver.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.WebDriver.findElement()

        openTestURL();

        WebDriver driver = getDriver();

        WebElement ui = driver.findElement(By.className("v-ui"));

        testBenchElement(ui).scroll(SCROLLTOP);

        driver.findElement(By.id("visibility-toggle"))
                .findElement(By.tagName("input")).click();
View Full Code Here

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

        WebElement ui = driver.findElement(By.className("v-ui"));

        testBenchElement(ui).scroll(SCROLLTOP);

        driver.findElement(By.id("visibility-toggle"))
                .findElement(By.tagName("input")).click();

        assertEquals("UI scroll position", String.valueOf(SCROLLTOP),
                ui.getAttribute("scrollTop"));
    }
View Full Code Here

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

                        WebElement sourceTextArea = getContainer(driver).findElement(By.className("xPlainTextEditor"));
                        return sourceTextArea.isEnabled() ? sourceTextArea : null;
                    } catch (NotFoundException sourceNotFound) {
                        WebElement richTextEditor = getContainer(driver).findElement(By.className("xRichTextEditor"));
                        try {
                            richTextEditor.findElement(By.className("loading"));
                            return null;
                        } catch (NotFoundException loadingNotFound) {
                            return richTextEditor;
                        }
                    }
View Full Code Here

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

        return findElement(By.id("emptyPageMessageWrapper"));
    }

    public void login(String username, String password) {
        final WebElement loginForm = getLoginForm();
        loginForm.findElement(By.id("usernameField")).sendKeys(username);
        loginForm.findElement(By.id("passwordField")).sendKeys(password);
        loginForm.submit();
    }

    public void openIdLogin(String openIdUrl) {
View Full Code Here

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

    }

    public void login(String username, String password) {
        final WebElement loginForm = getLoginForm();
        loginForm.findElement(By.id("usernameField")).sendKeys(username);
        loginForm.findElement(By.id("passwordField")).sendKeys(password);
        loginForm.submit();
    }

    public void openIdLogin(String openIdUrl) {
        final WebElement openIdLogin = getOpenIdLoginForm();
View Full Code Here

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

        loginForm.submit();
    }

    public void openIdLogin(String openIdUrl) {
        final WebElement openIdLogin = getOpenIdLoginForm();
        openIdLogin.findElement(By.id("openid_identifier")).sendKeys(openIdUrl);
        openIdLogin.submit();
    }

    public void logout() {
        final WebElement logoutLink = findElement(By.linkText("Logout"));
View Full Code Here

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

        WebElement row = rowWrappers.get(0);

        containerWidth = row.getSize().getWidth();
        assertRowWrapperWidth(containerWidth, rowWidth);

        buttonWidth = row.findElement(By.className("v-button")).getSize()
                .getWidth();
        assertButtonWidth(buttonWidth, containerWidth);

        row = rowWrappers.get(1);
        containerWidth = row.getSize().getWidth();
View Full Code Here

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

        row = rowWrappers.get(1);
        containerWidth = row.getSize().getWidth();
        assertRowWrapperWidth(containerWidth, rowWidth);

        buttonWidth = row.findElement(By.className("v-nativebutton")).getSize()
                .getWidth();
        assertButtonWidth(buttonWidth, containerWidth);

    }
View Full Code Here

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"));
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.