class BEMElementLocatorFactory extends DefaultElementLocatorFactory (View source)

Factory to create BEM block/element locators.

Properties

protected ISearchContext $searchContext Search context. from DefaultElementLocatorFactory
protected AnnotationManager $annotationManager Page factory. from DefaultElementLocatorFactory
private LocatorHelper $_locatorHelper Locator helper.

Methods

__construct(ISearchContext $search_context, AnnotationManager $annotation_manager, LocatorHelper $locator_helper)

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, LocatorHelper $locator_helper)

Create locator factory instance.

Parameters

ISearchContext $search_context Search context.
AnnotationManager $annotation_manager Annotation manager.
LocatorHelper $locator_helper Locator helper.

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