Package org.openqa.selenium

Examples of org.openqa.selenium.Point


   * Quadruple click is an Opera specific way of selecting a paragraph.
   *
   * @param where to click
   */
  public void quadrupleClick(Coordinates where) {
    Point p = getPoint(where, "quadruple click");
    exec.mouseAction(p.x, p.y, 4, OperaMouseKeys.LEFT);
  }
View Full Code Here


    Point p = getPoint(where, "quadruple click");
    exec.mouseAction(p.x, p.y, 4, OperaMouseKeys.LEFT);
  }

  public void mouseDown(Coordinates where) {
    Point p = getPoint(where, "mouse down");
    exec.mouseAction(p.x, p.y, OperaMouseKeys.LEFT_DOWN);
  }
View Full Code Here

    Point p = getPoint(where, "mouse down");
    exec.mouseAction(p.x, p.y, OperaMouseKeys.LEFT_DOWN);
  }

  public void mouseUp(Coordinates where) {
    Point p = getPoint(where, "mouse up");
    exec.mouseAction(p.x, p.y, OperaMouseKeys.LEFT_UP);
  }
View Full Code Here

    Point p = getPoint(where, "mouse up");
    exec.mouseAction(p.x, p.y, OperaMouseKeys.LEFT_UP);
  }

  public void mouseMove(Coordinates where) {
    Point p = getPoint(where, "mouse move");
    exec.mouseAction(p.x, p.y);
  }
View Full Code Here

    Point p = getPoint(where, "mouse move");
    exec.mouseAction(p.x, p.y);
  }

  public void mouseMove(Coordinates where, long xOffset, long yOffset) {
    Point p = getPoint(where, "mouse move");

    // We can't compare against Integer.MAX_VALUE and throw because this method isn't defined as
    // able to throw an Exception.  Weird things will just happen here...
    int xO = (int) xOffset;
    int yO = (int) yOffset;

    lastMousePosition = new Point(p.x + xO, p.y + yO);
    exec.mouseAction(p.x + xO, p.y + yO);
  }
View Full Code Here

   * @deprecated
   */
  @Deprecated
  @SuppressWarnings("unused")
  public void middleClick() {  // TODO(andreastt): Add this to Actions
    Point point = coordinates.inViewPort();
    exec.mouseAction(point.x, point.y, OperaMouseKeys.MIDDLE);
  }
View Full Code Here

                                        + "return (coords.left-window.pageXOffset)+','+(coords.top-window.pageYOffset)",
                                        objectId);
    }

    String[] location = coordinates.split(",");
    return new Point(Integer.valueOf(location[0]), Integer.valueOf(location[1]));
  }
View Full Code Here

   * @return a canvas representing the size and position of this element.
   */
  private Canvas buildCanvas() {
    Canvas canvas = new Canvas();
    Dimension dimension = getSize();
    Point point = coordinates.inViewPort();
    int x = point.x;
    int y = point.y;

    // Avoid internal error by making sure we have some width and height
    int w = Math.max(dimension.width, 1);
View Full Code Here

    private Rect cachedArea = null;
   
    @Override
    public Rect getArea() {
        if (cachedArea == null) {  
            Point location = getWebElement().getLocation();
            Dimension size = getWebElement().getSize();
            cachedArea = new Rect(location.getX(), location.getY(), size.getWidth(), size.getHeight());
           
            if (getLocator() != null && getLocator().getCorrections() != null) {
                cachedArea = correctedRect(cachedArea, getLocator().getCorrections());
            }
        }
View Full Code Here

    @Override
    public Point getLocation() {
        if (item.getArea() == null) {
            throw new RuntimeException("Element doesn't have area");
        }
        return new Point(item.getArea()[0], item.getArea()[1]);
    }
View Full Code Here

TOP

Related Classes of org.openqa.selenium.Point

Copyright © 2018 www.massapicom. 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.