ActionSequence
in package
Class for defining an array actions to be executed inside `performOn` of WebDriver
<?php
(new ActionSequence)->click('do')->click('undo');
ActionSequence::build()->click('do')->click('undo');
Tags
Table of Contents
Properties
- $actions : mixed
Methods
- __call() : mixed
- __toString() : mixed
- build() : ActionSequence
- Creates an instance
- fromArray() : $this
- Creates action sequence from associative array, where key is action, and value is action arguments
- run() : mixed
- Executes sequence of action as methods of passed object.
- toArray() : array<string|int, mixed>
- Returns a list of logged actions as associative array
- addAction() : mixed
Properties
$actions
protected
mixed
$actions
= []
Methods
__call()
public
__call(mixed $action, mixed $arguments) : mixed
Parameters
- $action : mixed
- $arguments : mixed
__toString()
public
__toString() : mixed
build()
Creates an instance
public
static build() : ActionSequence
Return values
ActionSequencefromArray()
Creates action sequence from associative array, where key is action, and value is action arguments
public
fromArray(array<string|int, mixed> $actions) : $this
Parameters
- $actions : array<string|int, mixed>
Return values
$thisrun()
Executes sequence of action as methods of passed object.
public
run(mixed $context) : mixed
Parameters
- $context : mixed
toArray()
Returns a list of logged actions as associative array
public
toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>addAction()
protected
addAction(mixed $action, mixed $arguments) : mixed
Parameters
- $action : mixed
- $arguments : mixed