Package org.openqa.selenium.interactions

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


        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

        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

            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

        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

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.