public class Drag extends 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.
| Modifier and Type | Class and Description |
|---|---|
static class |
Drag.Phase
Enumeration of phases supported by this
Drag object. |
| Constructor and Description |
|---|
Drag(ElementLocator<?> itemToDrag,
ElementLocator<?> dropTarget)
Initiates Drag object, handled by given Selenium instance, instructing drag of itemToDrag to dropTarget object.
|
| Modifier and Type | Method and Description |
|---|---|
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 |
setDragIndicator(ElementLocator<?> dragIndicator) |
void |
setDropTarget(ElementLocator<?> dropTarget) |
void |
setNumberOfSteps(int numberOfSteps) |
void |
start()
Starts first phase of dragging.
|
public Drag(ElementLocator<?> itemToDrag, ElementLocator<?> dropTarget)
itemToDrag - item to dragdropTarget - target of item draggingpublic void setDropTarget(ElementLocator<?> dropTarget)
public void setDragIndicator(ElementLocator<?> dragIndicator)
public void setNumberOfSteps(int numberOfSteps)
public void start()
public void mouseOut()
public void move()
public void enter()
public void drop()
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.