FileInput
class FileInput extends AbstractTypifiedElement implements ISimpleSetter (View source)
Represents web page file upload element.
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.
Indicates whether this select element support selecting multiple options at the same time.
Sets a file to be uploaded.
Sets value to the element.
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)
at line 36
boolean
isMultiple()
Indicates whether this select element support selecting multiple options at the same time.
at line 70
ISimpleSetter
setValue(mixed $value)
Sets value to the element.