Java 类org.openqa.selenium.interactions.internal.Coordinates 实例源码

项目:grid-refactor-remote-server    文件:MouseMoveToLocation.java   
@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;
}
项目:xframium-java    文件:MorelandWebElement.java   
@Override
public Coordinates getCoordinates()
{
    if ( webElement instanceof Locatable )
    {
        if ( cachedCoordinates == null )
            cachedCoordinates = ( (Locatable) webElement ).getCoordinates();

        return cachedCoordinates;
    }
    else
        return null;
}
项目:jsflight    文件:LocatedElement.java   
@Override
public Coordinates getCoordinates()
{
    try
    {
        return ((Locatable)delegate).getCoordinates();
    }
    catch (StaleElementReferenceException e)
    {
        reLocateElement();
        return getCoordinates();
    }
}
项目:grid-refactor-remote-server    文件:SingleTapOnElement.java   
@Override
public Void call() throws Exception {
  TouchScreen touchScreen = ((HasTouchScreen) getDriver()).getTouch();
  WebElement element = getKnownElements().get(elementId);
  Coordinates elementLocation = ((Locatable) element).getCoordinates();

  touchScreen.singleTap(elementLocation);

  return null;
}
项目:grid-refactor-remote-server    文件:Flick.java   
@Override
public Void call() throws Exception {
  TouchScreen touchScreen = ((HasTouchScreen) getDriver()).getTouch();

  if (elementId != null) {
    WebElement element = getKnownElements().get(elementId);
    Coordinates elementLocation = ((Locatable) element).getCoordinates();
    touchScreen.flick(elementLocation, xOffset, yOffset, speed);
  } else {
    touchScreen.flick(xSpeed, ySpeed);
  }

  return null;
}
项目:grid-refactor-remote-server    文件:DoubleTapOnElement.java   
@Override
public Void call() throws Exception {
  TouchScreen touchScreen = ((HasTouchScreen) getDriver()).getTouch();
  WebElement element = getKnownElements().get(elementId);
  Coordinates elementLocation = ((Locatable) element).getCoordinates();

  touchScreen.doubleTap(elementLocation);

  return null;
}
项目:grid-refactor-remote-server    文件:LongPressOnElement.java   
@Override
public Void call() throws Exception {
  TouchScreen touchScreen = ((HasTouchScreen) getDriver()).getTouch();
  WebElement element = getKnownElements().get(elementId);
  Coordinates elementLocation = ((Locatable) element).getCoordinates();
  touchScreen.longPress(elementLocation);

  return null;
}
项目:grid-refactor-remote-server    文件:Scroll.java   
@Override
public Void call() throws Exception {
  TouchScreen touchScreen = ((HasTouchScreen) getDriver()).getTouch();

  if (elementId != null) {
    WebElement element = getKnownElements().get(elementId);
    Coordinates elementLocation = ((Locatable) element).getCoordinates();
    touchScreen.scroll(elementLocation, xOffset, yOffset);
  } else {
    touchScreen.scroll(xOffset, yOffset);
  }
  return null;
}
项目:web-test-framework    文件:Element.java   
/**
 *
 * @param where
 * @return
 */
public Element mouseMove(final Coordinates where) {
  this.logAction("MOUSE MOVE");
  new RetryUntilTimeout<Boolean>() {
    @Override
    Boolean commandsToRun() {
      getDriver().getMouse().mouseMove(where);
      return true;
    }
  }.run();
  return this;
}
项目:web-test-framework    文件:Element.java   
/**
 *
 * @param where
 * @param xOffset
 * @param yOffset
 * @return
 */
public Element mouseMove(final Coordinates where, final long xOffset, final long yOffset) {
  this.logAction("MOUSE MOVE");
  new RetryUntilTimeout<Boolean>() {
    @Override
    Boolean commandsToRun() {
      getDriver().getMouse().mouseMove(where, xOffset, yOffset);
      return true;
    }
  }.run();
  return this;
}
项目:web-test-framework    文件:Element.java   
/**
 *
 * @return
 */
@Override
public Coordinates getCoordinates() {
  return new RetryUntilTimeout<Coordinates>() {
    @Override
    Coordinates commandsToRun() {
      return ((Locatable) element).getCoordinates();
    }
  }.run();
}
项目:minium    文件:MockWebElement.java   
@Override
public boolean equals(Object obj) {
    if (obj instanceof Coordinates) {
        Coordinates other = (Coordinates) obj;
        return Objects.equal(onScreen(), other.onScreen()) &&
                Objects.equal(onPage(), other.onPage()) &&
                Objects.equal(inViewPort(), other.inViewPort());
    }
    return false;
}
项目:teasy    文件:BaseTeasyElement.java   
@Override
public Coordinates getCoordinates() {
    return ((Locatable) getWrappedWebElement()).getCoordinates();
}
项目:teasy    文件:NullTeasyElement.java   
@Override
public Coordinates getCoordinates() {
    throw noSuchElementException();
}
项目:bobcat    文件:BobcatWebElement.java   
@Override
public Coordinates getCoordinates() {
  return locatable.getCoordinates();
}
项目:mario    文件:WebElementDriver.java   
public Coordinates elementLocation() {
    ElementLocationProbe location = new ElementLocationProbe(selector);
    check(location);
    return location.coordinates();
}
项目:mario    文件:WebRobot.java   
public void moveMouseTo(Coordinates where) {
    mouse().mouseMove(where);
}
项目:mario    文件:ElementLocationProbe.java   
public Coordinates coordinates() {
    return coordinates;
}
项目:mario    文件:UserGestures.java   
public static UserGesture mouseMoveTo(Coordinates where) {
    return robot -> robot.moveMouseTo(where);
}
项目:mario    文件:UserGestures.java   
public static UserGesture mouseClickAt(Coordinates where) {
    return sequenceOf(mouseMoveTo(where), mouseClick());
}
项目:snippets    文件:AngularElement.java   
@Override
public Coordinates getCoordinates() {
    AngularWait.waitForRequestsToFinish();
    return this.element.getCoordinates();
}
项目:OptimusPrime    文件:WebElementWrapper.java   
public void ScrollIntoView() {
    Coordinates thisElementCor = ((Locatable) element).getCoordinates();
    thisElementCor.inViewPort();
}
项目:JDI    文件:JList.java   
public Coordinates getCoordinates() {
    return ((Locatable)getWebElement()).getCoordinates();
}
项目:JDI    文件:J.java   
public Coordinates getCoordinates() {
    return ((Locatable)getWebElement()).getCoordinates();
}
项目:cinnamon    文件:WebElementWrapper.java   
@Override
public Coordinates getCoordinates() {
    return ((Locatable) getWrappedElement()).getCoordinates();
}
项目:cinnamon    文件:PageElementFacade.java   
@Override
public Coordinates getCoordinates() {
    return pageElement.getCoordinates();
}
项目:seleniumcapsules    文件:Element.java   
@Override
public Coordinates getCoordinates() {
    return ((Locatable) element).getCoordinates();
}
项目:minium    文件:DocumentWebElement.java   
@Override
public Coordinates getCoordinates() {
    webDriver.ensureSwitch();
    return ((Locatable) webElement).getCoordinates();
}
项目:minium    文件:DelegatorWebDriver.java   
@Override
public void click(Coordinates where) {
    ensureWebDriver();
    delegateMouse().click(where);
}
项目:minium    文件:DelegatorWebDriver.java   
@Override
public void doubleClick(Coordinates where) {
    ensureWebDriver();
    delegateMouse().doubleClick(where);
}
项目:minium    文件:DelegatorWebDriver.java   
@Override
public void mouseDown(Coordinates where) {
    ensureWebDriver();
    delegateMouse().mouseDown(where);
}
项目:minium    文件:DelegatorWebDriver.java   
@Override
public void mouseUp(Coordinates where) {
    ensureWebDriver();
    delegateMouse().mouseUp(where);
}
项目:minium    文件:DelegatorWebDriver.java   
@Override
public void mouseMove(Coordinates where) {
    ensureWebDriver();
    delegateMouse().mouseMove(where);
}
项目:minium    文件:DelegatorWebDriver.java   
@Override
public void mouseMove(Coordinates where, long xOffset, long yOffset) {
    ensureWebDriver();
    delegateMouse().mouseMove(where, xOffset, yOffset);
}
项目:minium    文件:DelegatorWebDriver.java   
@Override
public void contextClick(Coordinates where) {
    ensureWebDriver();
    delegateMouse().contextClick(where);
}
项目:minium    文件:MockWebDriver.java   
@Override
public void click(Coordinates where) {
}
项目:minium    文件:MockWebDriver.java   
@Override
public void doubleClick(Coordinates where) {
}
项目:minium    文件:MockWebDriver.java   
@Override
public void mouseDown(Coordinates where) {
}
项目:minium    文件:MockWebDriver.java   
@Override
public void mouseUp(Coordinates where) {
}
项目:minium    文件:MockWebDriver.java   
@Override
public void mouseMove(Coordinates where) {
}