org.openqa.selenium.interactions
Class DefaultActionChainsGenerator

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

public class DefaultActionChainsGenerator
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
DefaultActionChainsGenerator(Keyboard keyboard, Mouse mouse)
           
DefaultActionChainsGenerator(WebDriver driver)
           
 
Method Summary
 Action build()
           
 ActionChainsGenerator click()
           
 DefaultActionChainsGenerator click(WebElement onElement)
           
 DefaultActionChainsGenerator clickAndHold(WebElement onElement)
           
 DefaultActionChainsGenerator contextClick(WebElement onElement)
           
 DefaultActionChainsGenerator doubleClick(WebElement onElement)
           
 DefaultActionChainsGenerator dragAndDrop(WebElement source, WebElement target)
           
 DefaultActionChainsGenerator keyDown(Keys theKey)
           
 DefaultActionChainsGenerator keyDown(WebElement element, Keys theKey)
           
 DefaultActionChainsGenerator keyUp(Keys theKey)
           
 DefaultActionChainsGenerator keyUp(WebElement element, Keys theKey)
           
 ActionChainsGenerator moveByOffset(int xOffset, int yOffset)
           
 DefaultActionChainsGenerator moveToElement(WebElement toElement)
           
 ActionChainsGenerator moveToElement(WebElement toElement, int xOffset, int yOffset)
           
 DefaultActionChainsGenerator release(WebElement onElement)
           
 DefaultActionChainsGenerator sendKeys(java.lang.CharSequence... keysToSend)
           
 DefaultActionChainsGenerator 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

DefaultActionChainsGenerator

public DefaultActionChainsGenerator(WebDriver driver)

DefaultActionChainsGenerator

public DefaultActionChainsGenerator(Keyboard keyboard,
                                    Mouse mouse)
Method Detail

keyDown

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

keyDown

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

keyUp

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

keyUp

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

sendKeys

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

sendKeys

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

build

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

clickAndHold

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

release

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

click

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

click

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

doubleClick

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

moveToElement

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

moveToElement

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

moveByOffset

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

contextClick

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

dragAndDrop

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


Copyright © 2011. All Rights Reserved.