BEMElementLocator
class BEMElementLocator extends DefaultElementLocator (View source)
Locates BEM blocks/elements.
Properties
protected ISearchContext | $searchContext | Search context. | from DefaultElementLocator |
protected AnnotationManager | $annotationManager | Annotation manager. | from DefaultElementLocator |
protected Property | $property | Property. | from DefaultElementLocator |
private LocatorHelper | $_helper | Locator helper. |
Methods
__construct(Property $property, ISearchContext $search_context, AnnotationManager $annotation_manager, LocatorHelper $locator_helper)
Creates a new element locator.
array
getSelectors()
Returns final selectors to be used for element locating.
void
assertAnnotationClass(array $annotations)
Asserts that required annotations are present.
Expectation
shouldReceive(string $name)
No description
array
getBlockLocator(string $block_name, string|null $modificator_name = null, string|null $modificator_value = null)
Returns block locator.
array
getElementLocator(string $element_name, string $block_name, string|null $modificator_name = null, string|null $modificator_value = null)
Returns element locator.
Details
at line 45
__construct(Property $property, ISearchContext $search_context, AnnotationManager $annotation_manager, LocatorHelper $locator_helper)
Creates a new element locator.
in DefaultElementLocator at line 73
ISearchContext
getSearchContext()
Returns search context in use.
in DefaultElementLocator at line 83
NodeElement|null
find()
Find the element.
in DefaultElementLocator at line 96
NodeElement[]
findAll()
Find the element list.
at line 90
protected array
getSelectors()
Returns final selectors to be used for element locating.
at line 118
protected void
assertAnnotationClass(array $annotations)
Asserts that required annotations are present.
string
__toString()
Returns string representation of a locator.
at line 27
Expectation
shouldReceive(string $name)
at line 65
array
getBlockLocator(string $block_name, string|null $modificator_name = null, string|null $modificator_value = null)
Returns block locator.
at line 80
array
getElementLocator(string $element_name, string $block_name, string|null $modificator_name = null, string|null $modificator_value = null)
Returns element locator.