class WaitingElementLocator extends DefaultElementLocator (View source)

Class, that locates WebElements that might not be present at the moment.

Properties

protected ISearchContext $searchContext Search context. from DefaultElementLocator
protected AnnotationManager $annotationManager Annotation manager. from DefaultElementLocator
protected Property $property Property. from DefaultElementLocator
protected integer $timeout Time to wait for element to be ready (in seconds).

Methods

__construct(Property $property, ISearchContext $search_context, AnnotationManager $annotation_manager)

Creates a new element locator.

getSearchContext()

Returns search context in use.

NodeElement|null
find()

Find the element.

NodeElement[]
findAll()

Find the element list.

array
getSelectors()

Returns final selectors to be used for element locating.

void
assertAnnotationClass(array $annotations)

Asserts that required annotations are present.

string
__toString()

Returns string representation of a locator.

Expectation
shouldReceive(string $name)

No description

Details

__construct(Property $property, ISearchContext $search_context, AnnotationManager $annotation_manager)

Creates a new element locator.

Parameters

Property $property Property.
ISearchContext $search_context The context to use when finding the element.
AnnotationManager $annotation_manager Annotation manager.

ISearchContext getSearchContext()

Returns search context in use.

Return Value

ISearchContext

NodeElement|null find()

Find the element.

Return Value

NodeElement|null

NodeElement[] findAll()

Find the element list.

Return Value

NodeElement[]

protected array getSelectors()

Returns final selectors to be used for element locating.

Return Value

array

protected void assertAnnotationClass(array $annotations)

Asserts that required annotations are present.

Parameters

array $annotations Annotations to test.

Return Value

void

Exceptions

AnnotationException Thrown if none or wrong annotations given.

string __toString()

Returns string representation of a locator.

Return Value

string

Expectation shouldReceive(string $name)

Parameters

string $name

Return Value

Expectation