class DefaultElementLocatorFactory implements IElementLocatorFactory (View source)

Factory, that creates locators for finding WebElements.

Properties

protected ISearchContext $searchContext Search context.
protected AnnotationManager $annotationManager Page factory.

Methods

__construct(ISearchContext $search_context, AnnotationManager $annotation_manager)

Create locator factory instance.

createLocator(Property $property)

When a field on a class needs to be decorated with an IElementLocator this method will be called.

Expectation
shouldReceive(string $name)

No description

Details

__construct(ISearchContext $search_context, AnnotationManager $annotation_manager)

Create locator factory instance.

Parameters

ISearchContext $search_context Search context.
AnnotationManager $annotation_manager Annotation manager.

IElementLocator createLocator(Property $property)

When a field on a class needs to be decorated with an IElementLocator this method will be called.

Parameters

Property $property Property.

Return Value

IElementLocator

Expectation shouldReceive(string $name)

Parameters

string $name

Return Value

Expectation