WebDriverActions
in package
WebDriver action builder. It implements the builder pattern.
Table of Contents
Properties
Methods
- __construct() : mixed
- click() : WebDriverActions
- Mouse click.
- clickAndHold() : WebDriverActions
- Mouse click and hold.
- contextClick() : WebDriverActions
- Context-click (right click).
- doubleClick() : WebDriverActions
- Double click.
- dragAndDrop() : WebDriverActions
- Drag and drop from $source to $target.
- dragAndDropBy() : WebDriverActions
- Drag $source and drop by offset ($x_offset, $y_offset).
- keyDown() : WebDriverActions
- Press a key on keyboard.
- keyUp() : WebDriverActions
- Release a key on keyboard.
- moveByOffset() : WebDriverActions
- Mouse move by offset.
- moveToElement() : WebDriverActions
- Move to the middle of the given WebDriverElement.
- perform() : mixed
- A convenience method for performing the actions without calling build().
- release() : WebDriverActions
- Release the mouse button.
- sendKeys() : WebDriverActions
- Send keys by keyboard.
Properties
$action
protected
mixed
$action
$driver
protected
mixed
$driver
$keyboard
protected
mixed
$keyboard
$mouse
protected
mixed
$mouse
Methods
__construct()
public
__construct(WebDriverHasInputDevices $driver) : mixed
Parameters
- $driver : WebDriverHasInputDevices
click()
Mouse click.
public
click([WebDriverElement $element = null ]) : WebDriverActions
If $element is provided, move to the middle of the element first.
Parameters
- $element : WebDriverElement = null
Return values
WebDriverActionsclickAndHold()
Mouse click and hold.
public
clickAndHold([WebDriverElement $element = null ]) : WebDriverActions
If $element is provided, move to the middle of the element first.
Parameters
- $element : WebDriverElement = null
Return values
WebDriverActionscontextClick()
Context-click (right click).
public
contextClick([WebDriverElement $element = null ]) : WebDriverActions
If $element is provided, move to the middle of the element first.
Parameters
- $element : WebDriverElement = null
Return values
WebDriverActionsdoubleClick()
Double click.
public
doubleClick([WebDriverElement $element = null ]) : WebDriverActions
If $element is provided, move to the middle of the element first.
Parameters
- $element : WebDriverElement = null
Return values
WebDriverActionsdragAndDrop()
Drag and drop from $source to $target.
public
dragAndDrop(WebDriverElement $source, WebDriverElement $target) : WebDriverActions
Parameters
- $source : WebDriverElement
- $target : WebDriverElement
Return values
WebDriverActionsdragAndDropBy()
Drag $source and drop by offset ($x_offset, $y_offset).
public
dragAndDropBy(WebDriverElement $source, int $x_offset, int $y_offset) : WebDriverActions
Parameters
- $source : WebDriverElement
- $x_offset : int
- $y_offset : int
Return values
WebDriverActionskeyDown()
Press a key on keyboard.
public
keyDown([WebDriverElement $element = null ][, string $key = null ]) : WebDriverActions
If $element is provided, focus on that element first.
Parameters
- $element : WebDriverElement = null
- $key : string = null
Tags
Return values
WebDriverActionskeyUp()
Release a key on keyboard.
public
keyUp([WebDriverElement $element = null ][, string $key = null ]) : WebDriverActions
If $element is provided, focus on that element first.
Parameters
- $element : WebDriverElement = null
- $key : string = null
Tags
Return values
WebDriverActionsmoveByOffset()
Mouse move by offset.
public
moveByOffset(int $x_offset, int $y_offset) : WebDriverActions
Parameters
- $x_offset : int
- $y_offset : int
Return values
WebDriverActionsmoveToElement()
Move to the middle of the given WebDriverElement.
public
moveToElement(WebDriverElement $element[, int $x_offset = null ][, int $y_offset = null ]) : WebDriverActions
Extra shift, calculated from the top-left corner of the element, can be set by passing $x_offset and $y_offset parameters.
Parameters
- $element : WebDriverElement
- $x_offset : int = null
- $y_offset : int = null
Return values
WebDriverActionsperform()
A convenience method for performing the actions without calling build().
public
perform() : mixed
release()
Release the mouse button.
public
release([WebDriverElement $element = null ]) : WebDriverActions
If $element is provided, move to the middle of the element first.
Parameters
- $element : WebDriverElement = null
Return values
WebDriverActionssendKeys()
Send keys by keyboard.
public
sendKeys([WebDriverElement $element = null ][, string $keys = null ]) : WebDriverActions
If $element is provided, focus on that element first (using single mouse click).
Parameters
- $element : WebDriverElement = null
- $keys : string = null