Examples of HWNDByReference


Examples of org.openqa.selenium.ie.ExportedWebDriverFunctions.HWNDByReference

    errors.verifyErrorCode(result, "select");
  }

  public void hover() {
    HWNDByReference hwnd = new HWNDByReference();
    NativeLongByReference x = new NativeLongByReference();
    NativeLongByReference y = new NativeLongByReference();
    NativeLongByReference width = new NativeLongByReference();
    NativeLongByReference height = new NativeLongByReference();
    int result = lib.wdeGetDetailsOnceScrolledOnToScreen(element, hwnd, x, y, width, height);

    errors.verifyErrorCode(result, "hover");

    long midX = x.getValue().longValue() + (width.getValue().longValue() / 2);
    long midY = y.getValue().longValue() + (height.getValue().longValue() / 2);

    result = lib.wdeMouseMoveTo(hwnd.getValue(), new NativeLong(100),
                                new NativeLong(0), new NativeLong(0),
                                new NativeLong(midX), new NativeLong(midY));

    errors.verifyErrorCode(result, "hover mouse move");
  }
View Full Code Here

Examples of org.openqa.selenium.ie.ExportedWebDriverFunctions.HWNDByReference

    return displayed.getValue() == 1;
  }

  public Point getLocationOnScreenOnceScrolledIntoView() {
    HWNDByReference hwnd = new HWNDByReference();
    NativeLongByReference x = new NativeLongByReference();
    NativeLongByReference y = new NativeLongByReference();
    NativeLongByReference width = new NativeLongByReference();
    NativeLongByReference height = new NativeLongByReference();
    if (lib.wdeGetDetailsOnceScrolledOnToScreen(element, hwnd, x, y, width, height) != 0) {
View Full Code Here

Examples of org.openqa.selenium.ie.ExportedWebDriverFunctions.HWNDByReference

    super.finalize();
    lib.wdeFreeElement(element);
  }

  public void dragAndDropBy(int moveRightBy, int moveDownBy) {
    HWNDByReference hwnd = new HWNDByReference();
    NativeLongByReference x = new NativeLongByReference();
    NativeLongByReference y = new NativeLongByReference();
    NativeLongByReference width = new NativeLongByReference();
    NativeLongByReference height = new NativeLongByReference();
    int result = lib.wdeGetDetailsOnceScrolledOnToScreen(element, hwnd, x, y, width, height);
    errors.verifyErrorCode(result, "Unable to determine location once scrolled on to screen");

    lib.wdeMouseDownAt(hwnd.getValue(), x.getValue(), y.getValue());

    long endX = x.getValue().longValue() + moveRightBy;
    long endY = y.getValue().longValue() + moveDownBy;

    int duration = parent.manage().getSpeed().getTimeOut();
    lib.wdeMouseMoveTo(hwnd.getValue(), new NativeLong(duration), x.getValue(), y.getValue(),
                       new NativeLong(endX), new NativeLong(endY));
    lib.wdeMouseUpAt(hwnd.getValue(), new NativeLong(endX), new NativeLong(endY));
  }
View Full Code Here

Examples of org.openqa.selenium.ie.ExportedWebDriverFunctions.HWNDByReference

                       new NativeLong(endX), new NativeLong(endY));
    lib.wdeMouseUpAt(hwnd.getValue(), new NativeLong(endX), new NativeLong(endY));
  }

  public void dragAndDropOn(RenderedWebElement toElement) {
    HWNDByReference hwnd = new HWNDByReference();
    NativeLongByReference x = new NativeLongByReference();
    NativeLongByReference y = new NativeLongByReference();
    NativeLongByReference width = new NativeLongByReference();
    NativeLongByReference height = new NativeLongByReference();
    int result = lib.wdeGetDetailsOnceScrolledOnToScreen(element, hwnd, x, y, width, height);
    errors.verifyErrorCode(result, "Unable to determine location once scrolled on to screen");

    NativeLong
        startX =
        new NativeLong(x.getValue().longValue() + (width.getValue().longValue() / 2));
    NativeLong
        startY =
        new NativeLong(y.getValue().longValue() + (height.getValue().longValue() / 2));

    lib.wdeMouseDownAt(hwnd.getValue(), startX, startY);

    Pointer other = ((InternetExplorerElement) toElement).element;
    result = lib.wdeGetDetailsOnceScrolledOnToScreen(other, hwnd, x, y, width, height);
    errors.verifyErrorCode(result,
                           "Unable to determine location of target once scrolled on to screen");

    NativeLong endX = new NativeLong(x.getValue().longValue() + (width.getValue().longValue() / 2));
    NativeLong
        endY =
        new NativeLong(y.getValue().longValue() + (height.getValue().longValue() / 2));

    int duration = parent.manage().getSpeed().getTimeOut();
    lib.wdeMouseMoveTo(hwnd.getValue(), new NativeLong(duration), startX, startY, endX, endY);
    lib.wdeMouseUpAt(hwnd.getValue(), endX, endY);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.