class DocumentElement in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/behat/mink/src/Element/DocumentElement.php \Behat\Mink\Element\DocumentElement
Document element.
@author Konstantin Kudryashov <ever.zet@gmail.com>
Hierarchy
- class \Behat\Mink\Element\Element implements ElementInterface
- class \Behat\Mink\Element\TraversableElement
- class \Behat\Mink\Element\DocumentElement
- class \Behat\Mink\Element\TraversableElement
Expanded class hierarchy of DocumentElement
2 files declare their use of DocumentElement
- DocumentElementTest.php in vendor/
behat/ mink/ tests/ Element/ DocumentElementTest.php - Session.php in vendor/
behat/ mink/ src/ Session.php
File
- vendor/
behat/ mink/ src/ Element/ DocumentElement.php, line 18
Namespace
Behat\Mink\ElementView source
class DocumentElement extends TraversableElement {
/**
* Returns XPath for handled element.
*
* @return string
*/
public function getXpath() {
return '//html';
}
/**
* Returns document content.
*
* @return string
*/
public function getContent() {
return trim($this
->getDriver()
->getContent());
}
/**
* Check whether document has specified content.
*
* @param string $content
*
* @return Boolean
*/
public function hasContent($content) {
return $this
->has('named', array(
'content',
$content,
));
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DocumentElement:: |
public | function | Returns document content. | |
DocumentElement:: |
public | function |
Returns XPath for handled element. Overrides ElementInterface:: |
|
DocumentElement:: |
public | function | Check whether document has specified content. | |
Element:: |
private | property | Driver. | |
Element:: |
private | property | ||
Element:: |
private | property | ||
Element:: |
private | property | ||
Element:: |
protected | function | Builds an ElementNotFoundException. | |
Element:: |
public | function |
Finds first element with specified selector inside the current element. Overrides ElementInterface:: |
|
Element:: |
public | function |
Finds all elements with specified selector inside the current element. Overrides ElementInterface:: |
|
Element:: |
protected | function | Returns element's driver. | |
Element:: |
public | function |
Returns element inner html. Overrides ElementInterface:: |
|
Element:: |
public | function | Returns element outer html. | |
Element:: |
protected | function | Returns selectors handler. | |
Element:: |
public | function |
Returns element session. Overrides ElementInterface:: |
|
Element:: |
public | function |
Returns element text (inside tag). Overrides ElementInterface:: |
|
Element:: |
public | function |
Checks whether element with specified selector exists inside the current element. Overrides ElementInterface:: |
|
Element:: |
public | function |
Checks if an element still exists in the DOM. Overrides ElementInterface:: |
|
Element:: |
public | function |
Waits for an element(-s) to appear and returns it. Overrides ElementInterface:: |
|
Element:: |
public | function | Initialize element. | 1 |
TraversableElement:: |
public | function | Attach file to file field with specified locator. | |
TraversableElement:: |
public | function | Checks checkbox with specified locator. | |
TraversableElement:: |
public | function | Clicks link with specified locator. | |
TraversableElement:: |
public | function | Fills in field (input, textarea, select) with specified locator. | |
TraversableElement:: |
public | function | Finds button (input[type=submit|image|button|reset], button) with specified locator. | |
TraversableElement:: |
public | function | Finds element by its id. | |
TraversableElement:: |
public | function | Finds field (input, textarea, select) with specified locator. | |
TraversableElement:: |
public | function | Finds link with specified locator. | |
TraversableElement:: |
public | function | Checks whether element has a button (input[type=submit|image|button|reset], button) with specified locator. | |
TraversableElement:: |
public | function | Checks whether element has a checkbox with specified locator, which is checked. | |
TraversableElement:: |
public | function | Checks whether element has a field (input, textarea, select) with specified locator. | |
TraversableElement:: |
public | function | Checks whether element has a link with specified locator. | |
TraversableElement:: |
public | function | Checks whether element has a select field with specified locator. | |
TraversableElement:: |
public | function | Checks whether element has a table with specified locator. | |
TraversableElement:: |
public | function | Checks whether element has a checkbox with specified locator, which is unchecked. | |
TraversableElement:: |
public | function | Presses button (input[type=submit|image|button|reset], button) with specified locator. | |
TraversableElement:: |
public | function | Selects option from select field with specified locator. | |
TraversableElement:: |
public | function | Unchecks checkbox with specified locator. |