WebDriverActions
class WebDriverActions (View source)
WebDriver action builder. It implements the builder pattern.
Properties
protected | $driver | ||
protected | $keyboard | ||
protected | $mouse | ||
protected | $action |
Methods
A convenience method for performing the actions without calling build().
Drag and drop from $source to $target.
Drag $source and drop by offset ($x_offset, $y_offset).
Mouse move by offset.
Move to the middle of the given WebDriverElement. If offset are provided, move the an offset from the top-left cornerof that element.
Details
__construct(WebDriver $driver)
No description
void
perform()
A convenience method for performing the actions without calling build().
WebDriverActions
click(WebDriverElement $element = null)
Mouse click.
If $element is provided, move to the middle of the element first.
WebDriverActions
clickAndHold(WebDriverElement $element = null)
Mouse click and hold.
If $element is provided, move to the middle of the element first.
WebDriverActions
contextClick(WebDriverElement $element = null)
Context-click (right click).
If $element is provided, move to the middle of the element first.
WebDriverActions
doubleClick(WebDriverElement $element = null)
Double click.
If $element is provided, move to the middle of the element first.
WebDriverActions
dragAndDrop(WebDriverElement $source, WebDriverElement $target)
Drag and drop from $source to $target.
WebDriverActions
dragAndDropBy(WebDriverElement $source, int $x_offset, int $y_offset)
Drag $source and drop by offset ($x_offset, $y_offset).
WebDriverActions
moveByOffset(int $x_offset, int $y_offset)
Mouse move by offset.
WebDriverActions
moveToElement(WebDriverElement $element, int $x_offset = null, int $y_offset = null)
Move to the middle of the given WebDriverElement. If offset are provided, move the an offset from the top-left cornerof that element.
WebDriverActions
release(WebDriverElement $element = null)
Release the mouse button.
If $element is provided, move to the middle of the element first.
WebDriverActions
keyDown(WebDriverElement $element = null, string $key = null)
Press a key on keyboard.
If $element is provided, focus on that element first.
WebDriverActions
keyUp(WebDriverElement $element = null, string $key = null)
Release a key on keyboard.
If $element is provided, focus on that element first.
WebDriverActions
sendKeys(WebDriverElement $element = null, string $keys = null)
Send keys by keyboard.
If $element is provided, focus on that element first.