org.openqa.selenium.interactions
Class Actions

java.lang.Object
  extended by org.openqa.selenium.interactions.Actions
All Implemented Interfaces:
ActionChainsGenerator

public class Actions
extends java.lang.Object
implements ActionChainsGenerator

Implements the builder pattern: Builds a CompositeAction containing all actions specified by the method calls.


Field Summary
protected  Keyboard keyboard
           
protected  Mouse mouse
           
 
Constructor Summary
Actions(Keyboard keyboard, Mouse mouse)
           
Actions(WebDriver driver)
           
 
Method Summary
 Action build()
           
 Actions click()
           
 Actions click(WebElement onElement)
           
 Actions clickAndHold(WebElement onElement)
           
 Actions contextClick(WebElement onElement)
           
 Actions doubleClick(WebElement onElement)
           
 Actions dragAndDrop(WebElement source, WebElement target)
           
 Actions keyDown(Keys theKey)
           
 Actions keyDown(WebElement element, Keys theKey)
           
 Actions keyUp(Keys theKey)
           
 Actions keyUp(WebElement element, Keys theKey)
           
 Actions moveByOffset(int xOffset, int yOffset)
           
 Actions moveToElement(WebElement toElement)
           
 Actions moveToElement(WebElement toElement, int xOffset, int yOffset)
           
 void perform()
           
 Actions release(WebElement onElement)
           
 Actions sendKeys(java.lang.CharSequence... keysToSend)
           
 Actions sendKeys(WebElement element, java.lang.CharSequence... keysToSend)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mouse

protected Mouse mouse

keyboard

protected Keyboard keyboard
Constructor Detail

Actions

public Actions(WebDriver driver)

Actions

public Actions(Keyboard keyboard,
               Mouse mouse)
Method Detail

keyDown

public Actions keyDown(Keys theKey)
Specified by:
keyDown in interface ActionChainsGenerator

keyDown

public Actions keyDown(WebElement element,
                       Keys theKey)
Specified by:
keyDown in interface ActionChainsGenerator

keyUp

public Actions keyUp(Keys theKey)
Specified by:
keyUp in interface ActionChainsGenerator

keyUp

public Actions keyUp(WebElement element,
                     Keys theKey)
Specified by:
keyUp in interface ActionChainsGenerator

sendKeys

public Actions sendKeys(java.lang.CharSequence... keysToSend)
Specified by:
sendKeys in interface ActionChainsGenerator

sendKeys

public Actions sendKeys(WebElement element,
                        java.lang.CharSequence... keysToSend)
Specified by:
sendKeys in interface ActionChainsGenerator

clickAndHold

public Actions clickAndHold(WebElement onElement)
Specified by:
clickAndHold in interface ActionChainsGenerator

release

public Actions release(WebElement onElement)
Specified by:
release in interface ActionChainsGenerator

click

public Actions click(WebElement onElement)
Specified by:
click in interface ActionChainsGenerator

click

public Actions click()
Specified by:
click in interface ActionChainsGenerator

doubleClick

public Actions doubleClick(WebElement onElement)
Specified by:
doubleClick in interface ActionChainsGenerator

moveToElement

public Actions moveToElement(WebElement toElement)
Specified by:
moveToElement in interface ActionChainsGenerator

moveToElement

public Actions moveToElement(WebElement toElement,
                             int xOffset,
                             int yOffset)
Specified by:
moveToElement in interface ActionChainsGenerator

moveByOffset

public Actions moveByOffset(int xOffset,
                            int yOffset)
Specified by:
moveByOffset in interface ActionChainsGenerator

contextClick

public Actions contextClick(WebElement onElement)
Specified by:
contextClick in interface ActionChainsGenerator

dragAndDrop

public Actions dragAndDrop(WebElement source,
                           WebElement target)
Specified by:
dragAndDrop in interface ActionChainsGenerator

build

public Action build()
Specified by:
build in interface ActionChainsGenerator

perform

public void perform()


Copyright © 2011. All Rights Reserved.