@Override public Void call() throws Exception { Mouse mouse = ((HasInputDevices) getDriver()).getMouse(); Coordinates elementLocation = null; if (elementProvided) { WebElement element = getKnownElements().get(elementId); elementLocation = ((Locatable) element).getCoordinates(); } if (offsetsProvided) { mouse.mouseMove(elementLocation, xOffset, yOffset); } else { mouse.mouseMove(elementLocation); } return null; }
@Step public EndUserSteps dragsCardToOtherLocation(Card card, TableLocation fromLocation, TableLocation toLocation) { TablePage page = getTablePage(); Optional<WebElementFacade> maybeCard = page.getCardAtTableLocationElement(card, fromLocation); assertTrue(maybeCard.isPresent()); Optional<WebElementFacade> maybeTableLocation = page.getTableLocationElement(toLocation); assertTrue(maybeTableLocation.isPresent()); Mouse mouse = ((HasInputDevices) getDriver()).getMouse(); mouse.mouseMove(maybeCard.get().getCoordinates(), 3, 3); // grab the top left corner mouse.mouseDown(null); // at the current location mouse.mouseMove(maybeTableLocation.get().getCoordinates()); mouse.mouseUp(maybeTableLocation.get().getCoordinates()); return this; }
@Override public Mouse getMouse() { setLastAction(); if ( webDriver instanceof HasInputDevices ) return ((HasInputDevices) webDriver).getMouse(); else return null; }
/** * Forces a mouseDown event on the WebElement. */ public void mouseDown() { TestLogging.log("MouseDown " + this.toString()); findElement(); final Mouse mouse = ((HasInputDevices) driver).getMouse(); mouse.mouseDown(null); }
/** * Forces a mouseOver event on the WebElement. */ public void mouseOver() { TestLogging.log("MouseOver " + this.toString()); findElement(); // build and perform the mouseOver with Advanced User Interactions API // Actions builder = new Actions(driver); // builder.moveToElement(element).build().perform(); final Locatable hoverItem = (Locatable) element; final Mouse mouse = ((HasInputDevices) driver).getMouse(); mouse.mouseMove(hoverItem.getCoordinates()); }
/** * Forces a mouseUp event on the WebElement. */ public void mouseUp() { TestLogging.log("MouseUp " + this.toString()); findElement(); final Mouse mouse = ((HasInputDevices) driver).getMouse(); mouse.mouseUp(null); }
@Override public Void call() throws Exception { Mouse mouse = ((HasInputDevices) getDriver()).getMouse(); if (leftMouseButton) { mouse.click(null); } else { mouse.contextClick(null); } return null; }
@Override public Mouse getMouse() { return ((HasInputDevices) driver).getMouse(); }
/** * Mouse doesn't work on mobile devices and emulators. */ @Deprecated public Mouse getMouse() { return super.getMouse(); }
private Mouse mouse() { return inputDevices().getMouse(); }
/** * @return the {@link Mouse} of current driver */ public Mouse getMouse() { return ((HasInputDevices) seleniumWebDriver()).getMouse(); }
@Override public Mouse getMouse() { return ((HasInputDevices)driver).getMouse(); }
@Override public Mouse getMouse() { return driver.getMouse(); }
@Override public Void call() throws Exception { Mouse mouse = ((HasInputDevices) getDriver()).getMouse(); mouse.mouseDown(null); return null; }
@Override public Void call() throws Exception { Mouse mouse = ((HasInputDevices) getDriver()).getMouse(); mouse.doubleClick(null); return null; }
@Override public Void call() throws Exception { Mouse mouse = ((HasInputDevices) getDriver()).getMouse(); mouse.mouseUp(null); return null; }
/** * * @return */ @Override public Mouse getMouse() { return ((HasInputDevices) driver).getMouse(); }
@Override public void perform(final WebElement target) { final Locatable hoverItem = (Locatable) target; final Mouse mouse = ((HasInputDevices) webDriver).getMouse(); mouse.mouseMove(hoverItem.getCoordinates()); }
@Override default Mouse getMouse() { HasInputDevices t = (HasInputDevices) get(); return t.getMouse(); }
@Override public Mouse getMouse() { return ((HasInputDevices) webDriver).getMouse(); }
protected Mouse delegateMouse() { return ((HasInputDevices) delegate).getMouse(); }
@Override public Mouse getMouse() { return new DelegatorMouse(); }
@Override public Mouse getMouse() { return mockMouse; }
Mouse getMouse();