Example usage for org.openqa.selenium.interactions ButtonReleaseAction ButtonReleaseAction

List of usage examples for org.openqa.selenium.interactions ButtonReleaseAction ButtonReleaseAction

Introduction

In this page you can find the example usage for org.openqa.selenium.interactions ButtonReleaseAction ButtonReleaseAction.

Prototype

public ButtonReleaseAction(Mouse mouse, Locatable locationProvider) 

Source Link

Usage

From source file:org.oneandone.qxwebdriver.interactions.Actions.java

License:LGPL

/**
 * Drag and drop action with additional mouse move required by qooxdoo.  
 *///  w  w w .  j av  a 2s .  co  m
public Actions dragAndDrop(WebElement source, WebElement target) {
    action.addAction(new ClickAndHoldAction(mouse, (Locatable) source));
    // qx needs an additional mousemove event to initialize a drag session
    action.addAction(new MoveToOffsetAction(mouse, null, 5, 5));
    action.addAction(new MoveMouseAction(mouse, (Locatable) target));
    action.addAction(new ButtonReleaseAction(mouse, (Locatable) target));
    return this;
}