Package org.openqa.selenium.interactions

Examples of org.openqa.selenium.interactions.Action.perform()


    protected void filterTextInput(WebElement input, String value, boolean valid) {
        input.click();
        input.clear();
        input.sendKeys(value);
        Action blur = valid ? Graphene.guardAjax(fireEventAction(input, "blur")) : fireEventAction(input, "blur");
        blur.perform();
    }

    protected Action fireEventAction(final WebElement element, final String event) {
        return new AbstractWebDriverTest.EventAction(browser, element, event);
    }
View Full Code Here


        browser.get(contextPath.toExternalForm());
        WebElement column1ResizeHandle = header.findElement(By.cssSelector(".rf-edt-hdr .rf-edt-td-column1 .rf-edt-rsz"));

        Actions builder = new Actions(browser);
        final Action dragAndDrop = builder.dragAndDropBy(column1ResizeHandle, -20, 0).build();
        dragAndDrop.perform();

        Assert.assertEquals("181px", firstRow.findElement(By.cssSelector("td")).getCssValue("width"));
        Assert.assertEquals("180px", firstRow.findElement(By.cssSelector("td .rf-edt-c-column1")).getCssValue("width"));
    }
View Full Code Here

        browser.get(contextPath.toExternalForm());
        WebElement column1ResizeHandle = header.findElement(By.cssSelector(".rf-edt-hdr .rf-edt-td-column1 .rf-edt-rsz"));

        Actions builder = new Actions(browser);
        final Action dragAndDrop = builder.dragAndDropBy(column1ResizeHandle, 20, 0).build();
        dragAndDrop.perform();

        Assert.assertEquals("221px", firstRow.findElement(By.cssSelector("td")).getCssValue("width"));
        Assert.assertEquals("220px", firstRow.findElement(By.cssSelector("td .rf-edt-c-column1")).getCssValue("width"));
    }
View Full Code Here

        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,
                window.getLocation().y);
View Full Code Here

        WebElement resizeHandle = browser.findElement(By.id("myForm:popupResizerSE"));
        Actions builder = new Actions(browser);

        final Action dragAndDrop = builder.dragAndDropBy(resizeHandle, 40, 40).build();
        dragAndDrop.perform();

        Assert.assertEquals("Container width", "340px", container.getCssValue("width"));
        Assert.assertEquals("Shadow width", "340px", shadow.getCssValue("width"));
        Assert.assertEquals("Container height", "240px", container.getCssValue("height"));
        Assert.assertEquals("Shadow height", "240px", shadow.getCssValue("height"));
View Full Code Here

    @Test
    public void testStalenessAndActionsOnWebDriver1() {
        WebElement stale = browser.findElement(By.className("stale"));
        Action action = new Actions(browser).clickAndHold(stale).release(stale).build();
        makeStale.click();
        action.perform();
    }

    @Test
    public void testStalenessAndActionsOnWebDriver2() {
        WebElement stale = browser.findElement(By.className("stale"));
View Full Code Here

    @Test
    public void testStalenessAndActionsOnWebDriver2() {
        WebElement stale = browser.findElement(By.className("stale"));
        Action action = new Actions(browser).moveToElement(stale).build();
        makeStale.click();
        action.perform();
    }

    @Test
    public void testStalenessAndActionsOnWebElement1() {
        WebElement inStale = browser.findElement(By.className("stale")).findElement(By.className("in-stale"));
View Full Code Here

    @Test
    public void testStalenessAndActionsOnWebElement1() {
        WebElement inStale = browser.findElement(By.className("stale")).findElement(By.className("in-stale"));
        Action action = new Actions(browser).clickAndHold(inStale).release(inStale).build();
        makeStale.click();
        action.perform();
    }

    @Test
    public void testStalenessAndActionsOnWebElement2() {
        WebElement inStale = browser.findElement(By.className("stale")).findElement(By.className("in-stale"));
View Full Code Here

    @Test
    public void testStalenessAndActionsOnWebElement2() {
        WebElement inStale = browser.findElement(By.className("stale")).findElement(By.className("in-stale"));
        Action action = new Actions(browser).moveToElement(inStale).build();
        makeStale.click();
        action.perform();
    }

    @JavaScript("Graphene.jqueryInstallator")
    @Dependency(sources = "org/jboss/arquillian/graphene/ftest/webdriver/jqueryInstallator.js", interfaces = JQuery.class)
    public interface JQueryInstallator {
View Full Code Here

    // so it is not initially visible on the screen.
    assertTrue(y > 4200, "Expected y > 4200, but got y = " + y);

    WebElement toScroll = driver.findElement(By.id("imagestart"));
    Action scroll = getBuilder(driver).scroll(toScroll, 0, -800).build();
    scroll.perform();

    y = link.getLocation().y;
    // After scrolling, the location of the element should change accordingly.
    assertTrue(y < 3500,"Expected y < 3500, but got y = " + y);
  }
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.