Examples of Actions


Examples of org.openqa.selenium.interactions.Actions

        openTestURL();

        WebElement clickedButton = vaadinElement("/VVerticalLayout[0]/VButton[0]");
        WebElement visitedButton = vaadinElement("/VVerticalLayout[0]/VButton[1]");

        new Actions(driver).moveToElement(clickedButton).clickAndHold()
                .moveToElement(visitedButton).moveToElement(clickedButton)
                .release().perform();

        assertEquals(ButtonClick.SUCCESS_TEXT,
                vaadinElement("/VVerticalLayout[0]/VLabel[0]").getText());
View Full Code Here

Examples of org.openqa.selenium.interactions.Actions

        invokeShortcut("C");
        Assert.assertEquals("4. Click event for enabled button", getLogRow(0));
    }

    private void invokeShortcut(CharSequence key) {
        new Actions(getDriver()).sendKeys(key).perform();
    }
View Full Code Here

Examples of org.openqa.selenium.interactions.Actions

    public void testTextAreaDndImage() {
        openTestURL();

        WebElement wrapper = driver.findElement(By
                .className("v-verticallayout"));
        Actions actions = new Actions(driver);
        actions.clickAndHold(wrapper);
        actions.moveByOffset(50, 50);
        actions.perform();

        WebElement dragElement = driver.findElement(By
                .className("v-drag-element"));
        List<WebElement> children = dragElement.findElements(By.xpath(".//*"));
        boolean found = false;
View Full Code Here

Examples of org.openqa.selenium.interactions.Actions

        assertThat(getTextAreaHeight(), is(size + offset));
    }

    private void resizeTextAreaBy(int offset) {
        int resizeHandlerOffset = 10;
        new Actions(getDriver())
                .moveToElement(getTextArea(),
                        TEXTAREAWIDTH - resizeHandlerOffset,
                        TEXTAREAHEIGHT - resizeHandlerOffset).clickAndHold()
                .moveByOffset(offset, offset).release().build().perform();
    }
View Full Code Here

Examples of org.openqa.selenium.interactions.Actions

        TableElement table = getTable();
        table.getCell(FIRSTSELECTEDROW, 0).click();

        scrollToBottom();

        new Actions(getDriver()).keyDown(Keys.SHIFT).click(getTable().getCell(LASTSELECTEDROW, 0)).keyUp(Keys.SHIFT)
                .build().perform();
    }
View Full Code Here

Examples of org.openqa.selenium.interactions.Actions

    private TableElement getTable() {
        return $(TableElement.class).first();
    }

    private void moveResizer(WebElement resizer, int offset) {
        new Actions(driver).clickAndHold(resizer).moveByOffset(offset, 0).release().perform();
    }
View Full Code Here

Examples of org.openqa.selenium.interactions.Actions

        textfield.focus();
        textfield.sendKeys("test");

        $(ButtonElement.class).first().click();

        new Actions(getDriver()).contextClick(textfield).perform();

        Assert.assertEquals("test", textfield.getValue());
    }
View Full Code Here

Examples of org.openqa.selenium.interactions.Actions

                .findElement(By.className("v-button"));

        button.click();

        // Loose the focus from the button.
        new Actions(getDriver())
                .moveToElement(panelScrollable, panelScrollableSize.width / 2,
                        panelScrollableSize.height / 2).click().build()
                .perform();

        compareScreen("window");
View Full Code Here

Examples of org.openqa.selenium.interactions.Actions

                By.className("v-window-footer"));

        final Point winPos = window.getLocation();

        // move window
        Action a = new Actions(driver).clickAndHold(windowFooter)
                .moveByOffset(100, 100).release().build();
        a.perform();
        assertNotEquals("Window was not dragged correctly.", winPos.x,
                window.getLocation().x);
        assertNotEquals("Window was not dragged correctly.", winPos.y,
View Full Code Here

Examples of org.openqa.selenium.interactions.Actions

    protected void moveMouseToTopLeft(WebElement element) {
        moveMouseTo(element, 0, 0);
    }

    protected void moveMouseTo(WebElement element, int offsetX, int offsetY) {
        new Actions(getDriver()).moveToElement(element, offsetX, offsetY)
                .perform();
    }
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.