@Override public Point getLocationOnScreenOnceScrolledIntoView() { if (element instanceof Locatable) { return ((Locatable) element) .getLocationOnScreenOnceScrolledIntoView(); } throw new UnsupportedOperationException( "Underlying element instance does not support location"); }
public Point getLocationOnScreenOnceScrolledIntoView() { WebElement element = this.getElement(); if ( element instanceof Locatable ) { return ((Locatable) element).getLocationOnScreenOnceScrolledIntoView(); } return null; }
if (element instanceof Locatable) { Locatable hoverItem = (Locatable) element; hoverItem.getLocationOnScreenOnceScrolledIntoView(); Mouse mouse = ((HasInputDevices) webDriver).getMouse(); mouse.mouseMove(hoverItem.getCoordinates()); }