com.atlassian.pageobjects.elements
Class PageElementActions

java.lang.Object
  extended by com.atlassian.pageobjects.elements.PageElementActions

public class PageElementActions
extends Object

Wrapper around WebDriver's Actions class for convenient use with PageElements. @Inject it into your page objects, or bind via PageBinder to get instance explicitly.

Build a sequence of actions to execute by using the builder-style methods of this class. After that build() a resulting action to execute, or just perform() the actions straight away.

Since:
2.1
See Also:
Actions

Constructor Summary
PageElementActions()
           
 
Method Summary
 PageElementActions click()
           
 PageElementActions click(PageElement onElement)
           
 PageElementActions clickAndHold()
           
 PageElementActions clickAndHold(PageElement onElement)
           
 PageElementActions contextClick(PageElement onElement)
           
 PageElementActions doubleClick()
           
 PageElementActions doubleClick(PageElement onElement)
           
 PageElementActions dragAndDrop(PageElement source, PageElement target)
           
 PageElementActions dragAndDropBy(PageElement source, int xOffset, int yOffset)
           
 PageElementActions keyDown(org.openqa.selenium.Keys theKey)
           
 PageElementActions keyDown(PageElement element, org.openqa.selenium.Keys theKey)
           
 PageElementActions keyUp(org.openqa.selenium.Keys theKey)
           
 PageElementActions keyUp(PageElement element, org.openqa.selenium.Keys theKey)
           
 PageElementActions moveByOffset(int xOffset, int yOffset)
           
 PageElementActions moveToElement(PageElement toElement)
           
 PageElementActions moveToElement(PageElement toElement, int xOffset, int yOffset)
           
 void perform()
          Execute the specified series of actions.
 PageElementActions release()
           
 PageElementActions release(PageElement onElement)
           
 PageElementActions reset()
          Reset the sequence of actions to execute.
 PageElementActions sendKeys(CharSequence... keysToSend)
           
 PageElementActions sendKeys(PageElement element, CharSequence... keysToSend)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PageElementActions

public PageElementActions()
Method Detail

keyDown

public PageElementActions keyDown(org.openqa.selenium.Keys theKey)
See Also:
Actions.keyDown(org.openqa.selenium.Keys)

keyDown

public PageElementActions keyDown(PageElement element,
                                  org.openqa.selenium.Keys theKey)
See Also:
Actions.keyDown(org.openqa.selenium.WebElement, org.openqa.selenium.Keys)

keyUp

public PageElementActions keyUp(org.openqa.selenium.Keys theKey)
See Also:
Actions.keyUp(org.openqa.selenium.Keys)

keyUp

public PageElementActions keyUp(PageElement element,
                                org.openqa.selenium.Keys theKey)
See Also:
Actions.keyUp(org.openqa.selenium.WebElement, org.openqa.selenium.Keys)

sendKeys

public PageElementActions sendKeys(CharSequence... keysToSend)
See Also:
Actions.sendKeys(CharSequence...)

sendKeys

public PageElementActions sendKeys(PageElement element,
                                   CharSequence... keysToSend)
See Also:
Actions.sendKeys(org.openqa.selenium.WebElement, CharSequence...)

clickAndHold

public PageElementActions clickAndHold(PageElement onElement)
See Also:
Actions.clickAndHold(org.openqa.selenium.WebElement)

clickAndHold

public PageElementActions clickAndHold()
See Also:
Actions.clickAndHold()

release

public PageElementActions release(PageElement onElement)
See Also:
Actions.release(org.openqa.selenium.WebElement)

release

public PageElementActions release()
See Also:
Actions.release()

click

public PageElementActions click(PageElement onElement)
See Also:
Actions.click(org.openqa.selenium.WebElement)

click

public PageElementActions click()
See Also:
Actions.click()

doubleClick

public PageElementActions doubleClick(PageElement onElement)
See Also:
Actions.doubleClick(org.openqa.selenium.WebElement)

doubleClick

public PageElementActions doubleClick()
See Also:
Actions.doubleClick()

moveToElement

public PageElementActions moveToElement(PageElement toElement)
See Also:
Actions.moveToElement(org.openqa.selenium.WebElement)

moveToElement

public PageElementActions moveToElement(PageElement toElement,
                                        int xOffset,
                                        int yOffset)
See Also:
Actions.moveToElement(org.openqa.selenium.WebElement, int, int)

moveByOffset

public PageElementActions moveByOffset(int xOffset,
                                       int yOffset)
See Also:
Actions.moveByOffset(int, int)

contextClick

public PageElementActions contextClick(PageElement onElement)
See Also:
Actions.contextClick(org.openqa.selenium.WebElement)

dragAndDrop

public PageElementActions dragAndDrop(PageElement source,
                                      PageElement target)
See Also:
Actions.dragAndDrop(org.openqa.selenium.WebElement, org.openqa.selenium.WebElement)

dragAndDropBy

public PageElementActions dragAndDropBy(PageElement source,
                                        int xOffset,
                                        int yOffset)
See Also:
Actions.dragAndDropBy(org.openqa.selenium.WebElement, int, int)

perform

public void perform()
Execute the specified series of actions. This also resets the actions.


reset

public PageElementActions reset()
Reset the sequence of actions to execute.

Returns:
this actions instance


Copyright © 2014 Atlassian. All rights reserved.