TypifiedPropertyDecorator
class TypifiedPropertyDecorator extends DefaultPropertyDecorator (View source)
Default decorator for use with PageFactory. Will decorate 1) all of the
WebElement fields and 2) List
Properties
protected IElementLocatorFactory | $locatorFactory | Locator factory. | from DefaultPropertyDecorator |
protected IPageFactory | $pageFactory | Page factory. | from DefaultPropertyDecorator |
protected array | $elementToProxyMapping | Mapping between element classes, that factory supports and how to proxy them. | from DefaultPropertyDecorator |
private string | $_typifiedElementInterface | Typified element interface. | |
private string | $_typifiedElementCollection | Typified element collection. |
Methods
Creates decorator instance.
Returns proxy class, that can be used alongside with element class of a property.
Ensures that 2 given classes has a relation.
No description
Details
at line 53
__construct(IElementLocatorFactory $locator_factory, IPageFactory $page_factory)
Creates decorator instance.
IProxy
decorate(Property $property)
This method is called by PageFactory on all properties to decide how to decorate the property.
protected boolean
canDecorate(Property $property)
Checks if a property can be decorated.
at line 69
protected IProxy|null
doDecorate(Property $property, IElementLocator $locator)
Perform actual decoration.
protected string
getProxyClass(Property $property)
Returns proxy class, that can be used alongside with element class of a property.
protected boolean
classMatches(string $class_name, string $descendant_of)
Ensures that 2 given classes has a relation.