Package com.gargoylesoftware.htmlunit.html

Examples of com.gargoylesoftware.htmlunit.html.HtmlElement.mouseMove()


    final HtmlPage page = getContext().getCurrentHtmlResponse(this);
    final HtmlElement from = getByXPathOrId("From element", page, getFromXPath(), getFromHtmlId());
    final HtmlElement to = getByXPathOrId("To element", page, getToXPath(), getToHtmlId());

    from.mouseDown();
    to.mouseMove();
    to.mouseUp();
  }

  private HtmlElement getByXPathOrId(final String description, final HtmlPage page, final String xpath, String htmlId) throws XPathException
  {
View Full Code Here


        HtmlPage page = client.getPage("http://localhost/index.html");
        HtmlElement drag = (HtmlElement) page.getByXPath("//div[contains(@class, 'drag')]").get(0);
        HtmlElement drop = (HtmlElement) page.getByXPath("//div[@id='drop_2']").get(0);

        drag.mouseDown();
        drop.mouseMove();
        page = (HtmlPage) drop.mouseUp();
        client.waitForBackgroundJavaScript(1000);

        String log = page.executeJavaScript("$('#log').text()").getJavaScriptResult().toString();
        assertEquals("<div id=\"drop_2\" class=\"drop ui-droppable\"></div>", log);
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.