Examples of keyDown()


Examples of org.openqa.selenium.interactions.Actions.keyDown()

    private void clickOnRow(int rowIndex, Keys... keys) {
        checkSelectRowArguments(rowIndex, keys);
        Actions builder = new Actions(browser);
        for (Keys key : keys) {
            builder.keyDown(key).build().perform();
        }
        advanced().getCellElement(0, rowIndex).click();
        for (Keys key : keys) {
            builder.keyUp(key).build().perform();
        }
View Full Code Here

Examples of org.openqa.selenium.interactions.Actions.keyDown()

        WebElement textArea = $(TextAreaElement.class).first();
        Actions builder = new Actions(driver);
        builder.click(textArea);
        builder.sendKeys(textArea, "first line asdf");
        builder.keyDown(Keys.SHIFT);
        builder.sendKeys(Keys.ENTER);
        builder.keyUp(Keys.SHIFT);
        builder.sendKeys(textArea, "second line jkl;");
        builder.perform();
View Full Code Here

Examples of org.openqa.selenium.interactions.Actions.keyDown()

        WebElement textArea = $(TextAreaElement.class).first();
        Actions builder = new Actions(driver);
        builder.click(textArea);
        builder.sendKeys(textArea, "first line asdf");
        builder.keyDown(Keys.CONTROL);
        builder.sendKeys(Keys.ENTER);
        builder.keyUp(Keys.CONTROL);
        builder.sendKeys(textArea, "second line jkl;");
        builder.perform();
View Full Code Here

Examples of org.openqa.selenium.interactions.Actions.keyDown()

            boolean firstrun = true;
            for (WebElement keyElement : selection) {
                builder.click(keyElement);//also deselect previous selected elements
                if (firstrun) {
                    firstrun = false;
                    builder.keyDown(Keys.CONTROL);
                }
            }
            builder.keyUp(Keys.CONTROL);
            builder.build().perform();
        } else {
View Full Code Here

Examples of org.openqa.selenium.interactions.Actions.keyDown()

        return findDomElement(locator).getText();
    }

    public Action shiftTab() {
        Actions builder = new Actions(currentDriver);
        builder.keyDown(Keys.SHIFT)
                .sendKeys(Keys.TAB)
                .keyUp(Keys.SHIFT);
        return builder.build();
    }
View Full Code Here

Examples of org.seleniuminspector.ElementInspector.keyDown()

        testAppFunctionalPage("/requests/JSFC-2662.jsf");
        sleep(10000);
        Assert.assertEquals("JSFC-2662", selenium.getTitle());

        ElementInspector suggestionField = element("formID:degree");
        suggestionField.keyDown(KeyEvent.VK_DOWN);
        suggestionField.keyDown(KeyEvent.VK_DOWN);

        //press 'enter'
        suggestionField.keyPress(13);
        //press 'delete' button
View Full Code Here

Examples of org.seleniuminspector.ElementInspector.keyDown()

        sleep(10000);
        Assert.assertEquals("JSFC-2662", selenium.getTitle());

        ElementInspector suggestionField = element("formID:degree");
        suggestionField.keyDown(KeyEvent.VK_DOWN);
        suggestionField.keyDown(KeyEvent.VK_DOWN);

        //press 'enter'
        suggestionField.keyPress(13);
        //press 'delete' button
        suggestionField.keyPress(KeyEvent.VK_DELETE);
View Full Code Here

Examples of org.seleniuminspector.ElementInspector.keyDown()

        treeTable.doubleClick();
        assertTrue(selenium.isTextPresent("ondblclick works"));
        assertTrue(selenium.isTextPresent("dblclick"));

        //onkeydown
        treeTable.keyDown(KeyEvent.VK_DOWN);
        assertTrue(selenium.isTextPresent("onkeydown works"));
        assertTrue(selenium.isTextPresent("keydown"));

        //onkeypress
        treeTable.keyPress(KeyEvent.VK_DOWN);
View Full Code Here

Examples of org.seleniuminspector.ElementInspector.keyDown()

    //onblur
*/

        // onkeydown
        ElementInspector contentKeyDown = element("formID:content_keydownID");
        contentKeyDown.keyDown(KeyEvent.VK_M);
        assertTrue(selenium.isTextPresent("onkeydown works"));
        assertTrue(selenium.isTextPresent("keydown"));

        // onkeyup
        ElementInspector contentKeyUp = element("formID:content_keyupID");
View Full Code Here

Examples of org.seleniuminspector.ElementInspector.keyDown()

        assertTrue(selenium.isTextPresent("onmouseup works"));
        assertTrue(selenium.isTextPresent("mouseup"));

        ElementInspector secondSecondColumn = element("fn:second:1:secondColumn_body");
        //onkeydown
        secondSecondColumn.keyDown(KeyEvent.VK_RIGHT);
        assertTrue(selenium.isTextPresent("onkeydown works"));
        assertTrue(selenium.isTextPresent("keydown"));

        //onkeyup
        secondSecondColumn.keyUp(KeyEvent.VK_RIGHT);
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.