Package org.openqa.selenium.interactions

Examples of org.openqa.selenium.interactions.Mouse.mouseMove()


        Point startLoc = wnd.getLocation();
        Coordinates footerCoordinates = ((Locatable) wnd1Footer)
                .getCoordinates();
        Mouse mouse = ((HasInputDevices) getDriver()).getMouse();
        mouse.mouseDown(footerCoordinates);
        mouse.mouseMove(footerCoordinates, 200, 200);
        mouse.mouseUp(footerCoordinates);
        Point endLoc = wnd.getLocation();
        // don't compare to specific coordinate, because in IE9 and IE11
        // the window position is random.
        // So, checkt that the window was moved
View Full Code Here


        openTestURL();
        Coordinates button0Coordinates = getButtonCoordinates("Button 0");
        Coordinates button1Coordinates = getButtonCoordinates("Button 1");

        Mouse mouse = getMouse();
        mouse.mouseMove(button0Coordinates, 10, 10);
        sleep(1000);
        assertThat(getTooltipElement().getLocation().x, is(greaterThan(0)));

        mouse.mouseMove(button1Coordinates, 10, 10);
        assertThat(getTooltipElement().getLocation().x, is(lessThan(-1000)));
View Full Code Here

        Mouse mouse = getMouse();
        mouse.mouseMove(button0Coordinates, 10, 10);
        sleep(1000);
        assertThat(getTooltipElement().getLocation().x, is(greaterThan(0)));

        mouse.mouseMove(button1Coordinates, 10, 10);
        assertThat(getTooltipElement().getLocation().x, is(lessThan(-1000)));

        sleep(1000);
        assertThat(getTooltipElement().getLocation().x,
                is(greaterThan(button1Coordinates.onPage().x)));
View Full Code Here

    private void showTooltip(int index) {
        Coordinates elementCoordinates = ((Locatable) getTab(index))
                .getCoordinates();
        Mouse mouse = ((HasInputDevices) getDriver()).getMouse();
        mouse.mouseMove(elementCoordinates);
    }

    private WebElement getTab(int index) {
        return vaadinElement("/VTabsheet[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild["
                + index + "]/domChild[0]");
View Full Code Here

    }

    private void showTooltip(WebElement element) {
        Coordinates elementCoordinates = ((Locatable) element).getCoordinates();
        Mouse mouse = ((HasInputDevices) getDriver()).getMouse();
        mouse.mouseMove(elementCoordinates);
    }
}
View Full Code Here

        openTestURL();
        Mouse mouse = ((HasInputDevices) getDriver()).getMouse();
        WebElement menu = $(MenuBarElement.class).first().getWrappedElement();
        Coordinates menuLocation = ((Locatable) menu).getCoordinates();
        mouse.click(menuLocation);
        mouse.mouseMove(menuLocation, 5, -40);
        WebElement tooltip = getTooltipElement();
        assertThat(tooltip.getLocation().x, is(lessThan(menuLocation.onPage().x
                - tooltip.getSize().getWidth())));

    }
View Full Code Here

                .first());

        Mouse mouse = ((HasInputDevices) getDriver()).getMouse();

        mouse.click(elementCoordinates);
        mouse.mouseMove(elementCoordinates, 15, 40);

        sleep(1000);

        assertThat(getTooltipElement().getLocation().getX(),
                is(lessThan(-1000)));
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.