RadioButton
class RadioButton extends LabeledElement (View source)
Represents single radio button in radio button group. Please use "RadioGroup" typified element for manipulations.
Constants
CRITERION_TAG |
|
CRITERION_ATTRS |
|
Properties
private string | $_name | Name of the element. | from AbstractTypifiedElement |
private WebElement | $_wrappedElement | Wrapped element. | from AbstractTypifiedElement |
private IPageFactory | $_pageFactory | Stores instance of used page factory. | from AbstractTypifiedElement |
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 page factory, used during object creation.
Checks whether element has attribute with specified name.
Returns specified attribute value.
Selects radio button uf it's not already selected.
Indicates whether radio button is selected.
Returns value of an option.
Details
__construct(WebElement $wrapped_element, IPageFactory $page_factory)
Specifies wrapped WebElement.
static INodeElementAware
fromNodeElement(NodeElement $node_element, IPageFactory $page_factory)
Creates Element instance based on existing NodeElement instance.
protected void
assertWrappedElement()
Checks that wrapped element meets the acceptance criteria.
protected boolean
isTagNameMatching(array $criterion)
Checks if the tag name(s) of the criterion are matching.
protected boolean
isAttributeMatching(array $criterion)
Checks if the attributes of the criterion are matching.
protected boolean
isValueMatchingCriterionDefinition(string $value, string $criterion)
Checks if passed value matching the defined criterion.
WebElement
getWrappedElement()
Returns wrapped element.
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.
string
getName()
Returns name of the entity.
Session
getSession()
deprecated
deprecated
Returns element session.
protected IPageFactory
getPageFactory()
Returns page factory, used during object creation.
boolean
isVisible()
Checks whether current node is visible on page.
boolean
isValid()
Checks if an element is still valid.
boolean
hasAttribute(string $name)
Checks whether element has attribute with specified name.
mixed|null
getAttribute(string $name)
Returns specified attribute value.
string
getXpath()
Returns XPath for handled element.
string
getTagName()
Returns current node tag name.
Escaper
getXpathEscaper()
Returns the XPath escaper.
protected boolean
isSeleniumDriver()
Checks, that Selenium driver is used.
string
__toString()
Returns string representation of element.
Expectation
shouldReceive(string $name)
in LabeledElement at line 27
NodeElement|null
getLabel()
Finds label corresponding to current element.
in LabeledElement at line 60
null|string
getLabelText()
Finds a text of the current element label.
in LabeledElement at line 73
null|string
getText()
Finds a text of the current element label.
at line 34
RadioButton
select()
Selects radio button uf it's not already selected.
at line 46
boolean
isSelected()
Indicates whether radio button is selected.
at line 56
string
getValue()
Returns value of an option.