AbstractTypifiedElement
class AbstractTypifiedElement implements ITypifiedElement, INodeElementAware (View source)
The base class to be used for making classes representing typified elements (i.e web page controls such as text inputs, buttons or more complex elements).
Constants
CRITERION_TAG |
|
CRITERION_ATTRS |
|
Properties
private string | $_name | Name of the element. | |
private WebElement | $_wrappedElement | Wrapped element. | |
private IPageFactory | $_pageFactory | Stores instance of used page factory. | |
protected array | $acceptanceCriteria | List of acceptance criteria. |
Methods
Creates Element instance based on existing NodeElement instance.
Checks that wrapped element meets the acceptance criteria.
Checks if the tag name(s) of the criterion are matching.
Checks if the attributes of the criterion are matching.
Checks if passed value matching the defined criterion.
Returns wrapped element.
Sets a name of an element.
Returns name of the entity.
Returns page factory, used during object creation.
Checks whether current node is visible on page.
Checks if an element is still valid.
Checks whether element has attribute with specified name.
Returns specified attribute value.
Returns XPath for handled element.
Returns current node tag name.
Returns the XPath escaper.
Checks, that Selenium driver is used.
Returns string representation of element.
No description
Details
at line 68
__construct(WebElement $wrapped_element, IPageFactory $page_factory)
Specifies wrapped WebElement.
at line 84
static INodeElementAware
fromNodeElement(NodeElement $node_element, IPageFactory $page_factory)
Creates Element instance based on existing NodeElement instance.
at line 97
protected void
assertWrappedElement()
Checks that wrapped element meets the acceptance criteria.
at line 128
protected boolean
isTagNameMatching(array $criterion)
Checks if the tag name(s) of the criterion are matching.
at line 144
protected boolean
isAttributeMatching(array $criterion)
Checks if the attributes of the criterion are matching.
at line 167
protected boolean
isValueMatchingCriterionDefinition(string $value, string $criterion)
Checks if passed value matching the defined criterion.
at line 177
WebElement
getWrappedElement()
Returns wrapped element.
at line 191
ITypifiedElement
setName(string $name)
Sets a name of an element.
This method is used by initialization mechanism and is not intended to be used directly.
at line 203
string
getName()
Returns name of the entity.
at line 214
Session
getSession()
deprecated
deprecated
Returns element session.
at line 229
protected IPageFactory
getPageFactory()
Returns page factory, used during object creation.
at line 239
boolean
isVisible()
Checks whether current node is visible on page.
at line 249
boolean
isValid()
Checks if an element is still valid.
at line 261
boolean
hasAttribute(string $name)
Checks whether element has attribute with specified name.
at line 273
mixed|null
getAttribute(string $name)
Returns specified attribute value.
at line 283
string
getXpath()
Returns XPath for handled element.
at line 293
string
getTagName()
Returns current node tag name.
at line 303
Escaper
getXpathEscaper()
Returns the XPath escaper.
at line 313
protected boolean
isSeleniumDriver()
Checks, that Selenium driver is used.
at line 323
string
__toString()
Returns string representation of element.