class WebDriverTouchActions extends WebDriverActions (View source)

WebDriver action builder for touch events

Properties

protected $driver from  WebDriverActions
protected $keyboard from  WebDriverActions
protected $mouse from  WebDriverActions
protected $action from  WebDriverActions
protected WebDriverTouchScreen $touchScreen

Methods

__construct(WebDriver $driver)

No description

void
perform()

A convenience method for performing the actions without calling build().

click(WebDriverElement $element = null)

Mouse click.

clickAndHold(WebDriverElement $element = null)

Mouse click and hold.

contextClick(WebDriverElement $element = null)

Context-click (right click).

doubleClick(WebDriverElement $element = null)

Double click.

dragAndDrop(WebDriverElement $source, WebDriverElement $target)

Drag and drop from $source to $target.

dragAndDropBy(WebDriverElement $source, int $x_offset, int $y_offset)

Drag $source and drop by offset ($x_offset, $y_offset).

moveByOffset(int $x_offset, int $y_offset)

Mouse move by offset.

moveToElement(WebDriverElement $element, int $x_offset = null, int $y_offset = null)

Move to the middle of the given WebDriverElement.

release(WebDriverElement $element = null)

Release the mouse button.

keyDown(WebDriverElement $element = null, string $key = null)

Press a key on keyboard.

keyUp(WebDriverElement $element = null, string $key = null)

Release a key on keyboard.

sendKeys(WebDriverElement $element = null, string $keys = null)

Send keys by keyboard.

tap(WebDriverElement $element)

No description

down(int $x, int $y)

No description

up(int $x, int $y)

No description

move(int $x, int $y)

No description

scroll(int $x, int $y)

No description

scrollFromElement(WebDriverElement $element, int $x, int $y)

No description

flick(int $x, int $y)

No description

flickFromElement(WebDriverElement $element, int $x, int $y, int $speed)

No description

Details

__construct(WebDriver $driver)

No description

Parameters

WebDriver $driver

void perform()

A convenience method for performing the actions without calling build().

Return Value

void

WebDriverActions click(WebDriverElement $element = null)

Mouse click.

If $element is provided, move to the middle of the element first.

Parameters

WebDriverElement $element

Return Value

WebDriverActions

WebDriverActions clickAndHold(WebDriverElement $element = null)

Mouse click and hold.

If $element is provided, move to the middle of the element first.

Parameters

WebDriverElement $element

Return Value

WebDriverActions

WebDriverActions contextClick(WebDriverElement $element = null)

Context-click (right click).

If $element is provided, move to the middle of the element first.

Parameters

WebDriverElement $element

Return Value

WebDriverActions

WebDriverActions doubleClick(WebDriverElement $element = null)

Double click.

If $element is provided, move to the middle of the element first.

Parameters

WebDriverElement $element

Return Value

WebDriverActions

WebDriverActions dragAndDrop(WebDriverElement $source, WebDriverElement $target)

Drag and drop from $source to $target.

Parameters

WebDriverElement $source
WebDriverElement $target

Return Value

WebDriverActions

WebDriverActions dragAndDropBy(WebDriverElement $source, int $x_offset, int $y_offset)

Drag $source and drop by offset ($x_offset, $y_offset).

Parameters

WebDriverElement $source
int $x_offset
int $y_offset

Return Value

WebDriverActions

WebDriverActions moveByOffset(int $x_offset, int $y_offset)

Mouse move by offset.

Parameters

int $x_offset
int $y_offset

Return Value

WebDriverActions

WebDriverActions moveToElement(WebDriverElement $element, int $x_offset = null, int $y_offset = null)

Move to the middle of the given WebDriverElement.

Extra shift, calculated from the top-left corner of the element, can be set by passing $x_offset and $y_offset parameters.

Parameters

WebDriverElement $element
int $x_offset
int $y_offset

Return Value

WebDriverActions

WebDriverActions release(WebDriverElement $element = null)

Release the mouse button.

If $element is provided, move to the middle of the element first.

Parameters

WebDriverElement $element

Return Value

WebDriverActions

WebDriverActions keyDown(WebDriverElement $element = null, string $key = null)

Press a key on keyboard.

If $element is provided, focus on that element first.

Parameters

WebDriverElement $element
string $key

Return Value

WebDriverActions

See also

WebDriverKeys for special keys like CONTROL, ALT, etc.

WebDriverActions keyUp(WebDriverElement $element = null, string $key = null)

Release a key on keyboard.

If $element is provided, focus on that element first.

Parameters

WebDriverElement $element
string $key

Return Value

WebDriverActions

See also

WebDriverKeys for special keys like CONTROL, ALT, etc.

WebDriverActions sendKeys(WebDriverElement $element = null, string $keys = null)

Send keys by keyboard.

If $element is provided, focus on that element first.

Parameters

WebDriverElement $element
string $keys

Return Value

WebDriverActions

See also

WebDriverKeys for special keys like CONTROL, ALT, etc.

WebDriverTouchActions tap(WebDriverElement $element)

No description

Parameters

WebDriverElement $element

Return Value

WebDriverTouchActions

WebDriverTouchActions down(int $x, int $y)

No description

Parameters

int $x
int $y

Return Value

WebDriverTouchActions

WebDriverTouchActions up(int $x, int $y)

No description

Parameters

int $x
int $y

Return Value

WebDriverTouchActions

WebDriverTouchActions move(int $x, int $y)

No description

Parameters

int $x
int $y

Return Value

WebDriverTouchActions

WebDriverTouchActions scroll(int $x, int $y)

No description

Parameters

int $x
int $y

Return Value

WebDriverTouchActions

WebDriverTouchActions scrollFromElement(WebDriverElement $element, int $x, int $y)

No description

Parameters

WebDriverElement $element
int $x
int $y

Return Value

WebDriverTouchActions

WebDriverTouchActions doubleTap(WebDriverElement $element)

No description

Parameters

WebDriverElement $element

Return Value

WebDriverTouchActions

WebDriverTouchActions longPress(WebDriverElement $element)

No description

Parameters

WebDriverElement $element

Return Value

WebDriverTouchActions

WebDriverTouchActions flick(int $x, int $y)

No description

Parameters

int $x
int $y

Return Value

WebDriverTouchActions

WebDriverTouchActions flickFromElement(WebDriverElement $element, int $x, int $y, int $speed)

No description

Parameters

WebDriverElement $element
int $x
int $y
int $speed

Return Value

WebDriverTouchActions