Examples of Actions


Examples of org.openqa.selenium.interactions.Actions

        compareScreen("stacked");

        WebElement window4 = driver.findElement(By
                .xpath("//*[contains(text(), 'Window 4')]"));
        new Actions(driver).moveToElement(window4, 1, 9).click().perform();

        compareScreen("win4-on-top");
    }
View Full Code Here

Examples of org.openqa.selenium.interactions.Actions

     * Tests that backspace action outside textfield is prevented
     */
    @Test
    public void testWithFocusOnModal() throws Exception {
        // Try to send back actions to the browser.
        new Actions(getDriver()).sendKeys(BACK_SPACE).perform();

        checkButtonsCount();
    }
View Full Code Here

Examples of org.openqa.selenium.interactions.Actions

        // tab in last field set focus on bottom component
        textField.sendKeys(TAB);

        // Try to send back actions to the browser.
        new Actions(getDriver()).sendKeys(BACK_SPACE).perform();

        checkButtonsCount();
    }
View Full Code Here

Examples of org.openqa.selenium.interactions.Actions

        browsers.remove(Browser.IE8.getDesiredCapabilities());
        return browsers;
    }

    private WebElement openContextMenu() {
        Actions actions = new Actions(getDriver());
        actions.contextClick(findElement(By.className("v-table-cell-wrapper")));
        actions.perform();
        return findElement(By.className("v-contextmenu"));
    }
View Full Code Here

Examples of org.openqa.selenium.interactions.Actions

        actions.perform();
        return findElement(By.className("v-contextmenu"));
    }

    private void closeContextMenu() {
        Actions actions = new Actions(getDriver());
        actions.click().build().perform();
    }
View Full Code Here

Examples of org.openqa.selenium.interactions.Actions

    @Test
    public void testTextAreaDndImage() {
        openTestURL();

        WebElement wrapper = driver.findElement(By.className("v-ddwrapper"));
        Actions actions = new Actions(driver);
        actions.click(wrapper);
        actions.perform();

        WebElement focusedElement = driver.findElement(By
                .className("v-textarea-focus"));
        Assert.assertNotNull("Text area did not obtain focus after click",
                focusedElement);
View Full Code Here

Examples of org.openqa.selenium.interactions.Actions

    }

    private void dragToTarget(String dragMode, WebElement dropTarget)
            throws IOException {
        WebElement draggable = vaadinElementById("label" + dragMode);
        new Actions(driver).moveToElement(draggable, 10, 10).clickAndHold()
                .moveByOffset(5, 0).perform();
        new Actions(driver).moveToElement(dropTarget, 12, 10).perform();
        compareScreen("dragMode" + dragMode);
        new Actions(driver).release().perform();
    }
View Full Code Here

Examples of org.openqa.selenium.interactions.Actions

        Point location = element.getLocation();

        element.click();

        new Actions(driver).moveToElement(element).perform();
        sleep(100);
        // move pointer bit right from the caption text
        new Actions(driver).moveByOffset(50, 0).clickAndHold()
                .moveByOffset(10, 2).moveByOffset(10, 0).moveByOffset(10, 0)
                .moveByOffset(10, 0).release().perform();

        String selection = ((JavascriptExecutor) getDriver()).executeScript(
                "return document.getSelection().toString();").toString();
View Full Code Here

Examples of org.openqa.selenium.interactions.Actions

        openTestURL();
        LabelElement element = $(LabelElement.class).get(4);
        LabelElement targetElement = $(LabelElement.class).get(1);
        checkTooltip(element,
                "Tooltip for the wrapper wrapping all the draggable layouts");
        new Actions(getDriver()).clickAndHold(element)
                .moveToElement(targetElement).perform();
        sleep(500);
        checkTooltipNotPresent();
        new Actions(getDriver()).release().perform();
        checkTooltip(element, "Drag was performed and tooltip was changed");
    }
View Full Code Here

Examples of org.openqa.selenium.interactions.Actions

        List<WebElement> rows = driver.findElements(By
                .className("v-table-cell-wrapper"));
        WebElement rangeStart = rows.get(0);
        WebElement rangeEnd = rows.get(1);
        rangeStart.click();
        new Actions(driver).keyDown(Keys.SHIFT).perform();
        rangeEnd.click();
        new Actions(driver).keyUp(Keys.SHIFT).perform();
        driver.findElement(By.className("v-button")).click();
        WebElement extraRow = driver.findElements(
                By.className("v-table-cell-wrapper")).get(1);
        new Actions(driver).keyDown(Keys.CONTROL).click(extraRow)
                .click(extraRow).keyUp(Keys.CONTROL).perform();
        driver.findElement(By.className("v-button")).click();
        try {
            driver.findElement(By.vaadin("Root/VNotification[0]"));
            Assert.fail("Notification is shown");
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.