Example usage for org.openqa.selenium.interactions Mouse Mouse

List of usage examples for org.openqa.selenium.interactions Mouse Mouse

Introduction

In this page you can find the example usage for org.openqa.selenium.interactions Mouse Mouse.

Prototype

Mouse

Source Link

Usage

From source file:org.jboss.arquillian.graphene.enricher.TestSeleniumResourceProvider.java

License:Open Source License

@Before
public void setUp() {
    when(((HasInputDevices) driver).getKeyboard()).thenReturn(new Keyboard() {
        @Override//from  w  ww . j  a  v  a  2 s. c  o  m
        public void sendKeys(CharSequence... keysToSend) {
            throw new UnsupportedOperationException("Not supported yet.");
        }

        @Override
        public void pressKey(CharSequence keyToPress) {
            throw new UnsupportedOperationException("Not supported yet.");
        }

        @Override
        public void releaseKey(CharSequence keyToRelease) {
            throw new UnsupportedOperationException("Not supported yet.");
        }
    });
    when(((HasInputDevices) driver).getMouse()).thenReturn(new Mouse() {

        @Override
        public void click(Coordinates where) {
            throw new UnsupportedOperationException("Not supported yet.");
        }

        @Override
        public void doubleClick(Coordinates where) {
            throw new UnsupportedOperationException("Not supported yet.");
        }

        @Override
        public void mouseDown(Coordinates where) {
            throw new UnsupportedOperationException("Not supported yet.");
        }

        @Override
        public void mouseUp(Coordinates where) {
            throw new UnsupportedOperationException("Not supported yet.");
        }

        @Override
        public void mouseMove(Coordinates where) {
            throw new UnsupportedOperationException("Not supported yet.");
        }

        @Override
        public void mouseMove(Coordinates where, long xOffset, long yOffset) {
            throw new UnsupportedOperationException("Not supported yet.");
        }

        @Override
        public void contextClick(Coordinates where) {
            throw new UnsupportedOperationException("Not supported yet.");
        }
    });
    GrapheneContext.setContextFor(new GrapheneConfiguration(), driver, Default.class);
    GrapheneRuntime.pushInstance(new DefaultGrapheneRuntime());
}