org.jboss.test.selenium.actions
Class Drag

java.lang.Object
  extended by org.jboss.test.selenium.actions.Drag

public class Drag
extends java.lang.Object

Provides item dragging capability to Selenium tests. Methods can be call in following serie: start, mouseOut, move, enter, drop. If we are calling preceding phase (e.g. move, when drag was already called), IllegalStateException is thrown. If we are calling following phase (e.g. drop, when no action was called), all phases preceding requested phase will be done before requested phase can be done.

Version:
$Revision$
Author:
Lukas Fryc

Constructor Summary
Drag(com.thoughtworks.selenium.Selenium selenium, java.lang.String item, java.lang.String target)
           
 
Method Summary
 void drop()
          Last phase of dragging.
 void enter()
          Starts fourth phase of dragging.
 void mouseOut()
          Starts second phase of dragging.
 void move()
          Starts third phase of dragging.
 void start()
          Starts first phase of dragging.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Drag

public Drag(com.thoughtworks.selenium.Selenium selenium,
            java.lang.String item,
            java.lang.String target)
Parameters:
selenium - initialized and started Selenium instance
item - item to drag
target - target of item dragging
Method Detail

start

public void start()
Starts first phase of dragging. Simulate left mouse button pressing and small initial movement.


mouseOut

public void mouseOut()
Starts second phase of dragging. If there is some unfinished preceding phases, it will be done before this phase. Simulate movement of mouse cursor out of the item that ve want to drag.


move

public void move()
Starts third phase of dragging. If there is some unfinished preceding phases, it will be done before this phase. Simulate movement of mouse cursor near the target item.


enter

public void enter()
Starts fourth phase of dragging. If there is some unfinished preceding phases, it will be done before this phase.


drop

public void drop()
Last phase of dragging. If there is some unfinished preceding phases, it will be done before this phase. Drop the item to target.



Copyright © 2010. All Rights Reserved.