Package org.openqa.selenium

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


        assertEquals("unexpected day content", "13", days.get(41).getText());

        // navigate down
        WebElement popupBody = popup.findElement(By
                .className("v-datefield-calendarpanel"));
        popupBody.sendKeys(Keys.ARROW_DOWN);

        // ensure the focus changed
        assertEquals(
                "unexpected focus",
                "23",
View Full Code Here


                popup.findElement(
                        By.className("v-datefield-calendarpanel-day-focused"))
                        .getText());

        // navigate down
        popupBody.sendKeys(Keys.ARROW_DOWN);

        // verify contents
        assertEquals(
                "unexpected month",
                "March 2010",
View Full Code Here

        assertEquals("unexpected day content", "10", days.get(41).getText());

        // navigate left
        popupBody = popup
                .findElement(By.className("v-datefield-calendarpanel"));
        popupBody.sendKeys(Keys.ARROW_LEFT);

        // ensure the focus changed
        assertEquals(
                "unexpected focus",
                "1",
View Full Code Here

                popup.findElement(
                        By.className("v-datefield-calendarpanel-day-focused"))
                        .getText());

        // navigate left
        popupBody.sendKeys(Keys.ARROW_LEFT);

        // verify contents
        assertEquals(
                "unexpected month",
                "February 2010",
View Full Code Here

        // navigate to previous month
        WebElement popupBody = popup.findElement(By
                .className("v-datefield-calendarpanel"));
        new Actions(driver).keyDown(Keys.SHIFT).perform();
        popupBody.sendKeys(Keys.ARROW_LEFT);
        new Actions(driver).keyUp(Keys.SHIFT).perform();

        // TODO: remove this once #14406 has been fixed
        if (!getBrowsersExcludingIE().contains(getDesiredCapabilities())
                && !Browser.IE8.getDesiredCapabilities().equals(
View Full Code Here

        assertEquals("unexpected day content", "22", days.get(25).getText());
        assertEquals("unexpected day content", "7", days.get(41).getText());

        // navigate to previous year
        new Actions(driver).keyDown(Keys.SHIFT).perform();
        popupBody.sendKeys(Keys.ARROW_DOWN);
        new Actions(driver).keyUp(Keys.SHIFT).perform();

        // TODO: remove this once #14406 has been fixed
        popup.findElement(By.className("v-datefield-calendarpanel-prevyear"))
                .findElement(By.tagName("button")).click();
View Full Code Here

    public void testViewScopedContext() throws Exception
    {
        driver.get(new URL(contextPath, "page.xhtml").toString());

        WebElement inputField = driver.findElement(By.id("test:valueInput"));
        inputField.sendKeys("23");

        WebElement button = driver.findElement(By.id("test:saveButton"));
        button.click();

        Assert.assertTrue(ExpectedConditions.textToBePresentInElement(By.id("test:valueOutput"), "23").apply(driver));
View Full Code Here

        //X Thread.sleep(600000L);

        driver.get(new URL(contextPath, "page.xhtml").toString());

        WebElement inputField = driver.findElement(By.id("test:valueInput"));
        inputField.sendKeys("23");

        WebElement button = driver.findElement(By.id("test:saveButton"));
        button.click();

        Assert.assertTrue(ExpectedConditions.textToBePresentInElement(By.id("valueOutput"), "23").apply(driver));
View Full Code Here

    public void testForward() throws Exception
    {
        driver.get(new URL(contextPath, "page1.xhtml").toString());

        WebElement inputFieldX = driver.findElement(By.id("testForm1:valueInputX"));
        inputFieldX.sendKeys("abc");
        WebElement inputFieldY = driver.findElement(By.id("testForm1:valueInputY"));
        inputFieldY.sendKeys("xyz");

        WebElement button = driver.findElement(By.id("testForm1:next"));
        button.click();
View Full Code Here

        driver.get(new URL(contextPath, "page1.xhtml").toString());

        WebElement inputFieldX = driver.findElement(By.id("testForm1:valueInputX"));
        inputFieldX.sendKeys("abc");
        WebElement inputFieldY = driver.findElement(By.id("testForm1:valueInputY"));
        inputFieldY.sendKeys("xyz");

        WebElement button = driver.findElement(By.id("testForm1:next"));
        button.click();

        Assert.assertTrue(ExpectedConditions.textToBePresentInElement(By.id("valueX"), "abc").apply(driver));
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.