interface IElementContainer implements ISearchContext (View source)

Interface to allow AbstractElementContainer class detection in proxies.

Methods

NodeElement|null
find(string $selector, string|array $locator)

Finds first element with specified selector.

NodeElement[]
findAll(string $selector, string|array $locator)

Finds all elements with specified selector.

mixed
waitFor(integer $timeout, callable $callback)

Waits for an element(-s) to appear and returns it.

Expectation
shouldReceive(string $name)

No description

Details

NodeElement|null find(string $selector, string|array $locator)

Finds first element with specified selector.

Parameters

string $selector Selector engine name.
string|array $locator Selector locator.

Return Value

NodeElement|null

NodeElement[] findAll(string $selector, string|array $locator)

Finds all elements with specified selector.

Parameters

string $selector Selector engine name.
string|array $locator Selector locator.

Return Value

NodeElement[]

mixed waitFor(integer $timeout, callable $callback)

Waits for an element(-s) to appear and returns it.

Parameters

integer $timeout Maximal allowed waiting time in seconds.
callable $callback Callback, which result is both used as waiting condition and returned. Will receive reference to this element as first argument.

Return Value

mixed

Exceptions

InvalidArgumentException When invalid callback given.

Expectation shouldReceive(string $name)

Parameters

string $name

Return Value

Expectation