class GoutteDriver in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/behat/mink-goutte-driver/src/GoutteDriver.php \Behat\Mink\Driver\GoutteDriver
Goutte driver.
@author Konstantin Kudryashov <ever.zet@gmail.com>
Hierarchy
- class \Behat\Mink\Driver\CoreDriver implements DriverInterface
- class \Behat\Mink\Driver\BrowserKitDriver
- class \Behat\Mink\Driver\GoutteDriver
- class \Behat\Mink\Driver\BrowserKitDriver
Expanded class hierarchy of GoutteDriver
3 files declare their use of GoutteDriver
- BrowserTestBase.php in core/
modules/ simpletest/ src/ BrowserTestBase.php - Contains \Drupal\simpletest\BrowserTestBase.
- GoutteConfig.php in vendor/
behat/ mink-goutte-driver/ tests/ GoutteConfig.php - InstantiationTest.php in vendor/
behat/ mink-goutte-driver/ tests/ Custom/ InstantiationTest.php
File
- vendor/
behat/ mink-goutte-driver/ src/ GoutteDriver.php, line 21
Namespace
Behat\Mink\DriverView source
class GoutteDriver extends BrowserKitDriver {
/**
* Initializes Goutte driver.
*
* @param Client $client Goutte client instance
*/
public function __construct(Client $client = null) {
parent::__construct($client ?: new ExtendedClient());
}
/**
* {@inheritdoc}
*/
public function setBasicAuth($user, $password) {
if (false === $user) {
$this
->getClient()
->resetAuth();
return;
}
$this
->getClient()
->setAuth($user, $password);
}
/**
* Gets the Goutte client.
*
* The method is overwritten only to provide the appropriate return type hint.
*
* @return Client
*/
public function getClient() {
return parent::getClient();
}
/**
* {@inheritdoc}
*/
public function reset() {
parent::reset();
$this
->getClient()
->resetAuth();
}
/**
* {@inheritdoc}
*/
protected function prepareUrl($url) {
return $url;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BrowserKitDriver:: |
private | property | ||
BrowserKitDriver:: |
private | property | ||
BrowserKitDriver:: |
private | property | ||
BrowserKitDriver:: |
private | property | ||
BrowserKitDriver:: |
private | property | ||
BrowserKitDriver:: |
private | property | ||
BrowserKitDriver:: |
public | function |
Attaches file path to file field located by it's XPath query. Overrides CoreDriver:: |
|
BrowserKitDriver:: |
public | function |
Moves browser backward 1 page. Overrides CoreDriver:: |
|
BrowserKitDriver:: |
private | function | Determines if a node can reset a form. | |
BrowserKitDriver:: |
private | function | Determines if a node can submit a form. | |
BrowserKitDriver:: |
public | function |
Checks checkbox by it's XPath query. Overrides CoreDriver:: |
|
BrowserKitDriver:: |
public | function |
Clicks button or link located by it's XPath query. Overrides CoreDriver:: |
|
BrowserKitDriver:: |
private | function | Deletes a cookie by name. | |
BrowserKitDriver:: |
public | function |
Finds elements with specified XPath query. Overrides CoreDriver:: |
|
BrowserKitDriver:: |
public | function |
Moves browser forward 1 page. Overrides CoreDriver:: |
|
BrowserKitDriver:: |
public | function |
Returns element's attribute by it's XPath query. Overrides CoreDriver:: |
|
BrowserKitDriver:: |
private | function | Returns the checkbox field from xpath query, ensuring it is valid. | |
BrowserKitDriver:: |
public | function |
Returns last response content. Overrides CoreDriver:: |
|
BrowserKitDriver:: |
public | function |
Returns cookie by name. Overrides CoreDriver:: |
|
BrowserKitDriver:: |
private | function | Returns current cookie path. | |
BrowserKitDriver:: |
private | function | Returns crawler instance (got from client). | |
BrowserKitDriver:: |
private | function | Returns DOMElement from crawler instance. | |
BrowserKitDriver:: |
public | function |
Returns current URL address. Overrides CoreDriver:: |
|
BrowserKitDriver:: |
private | function | Gets the position of the field node among elements with the same name | |
BrowserKitDriver:: |
private | function | Returns a crawler filtered for the given XPath, requiring at least 1 result. | |
BrowserKitDriver:: |
protected | function | Returns form field from XPath query. | |
BrowserKitDriver:: |
private | function | ||
BrowserKitDriver:: |
private | function | Returns form node unique identifier. | |
BrowserKitDriver:: |
public | function |
Returns element's inner html by it's XPath query. Overrides CoreDriver:: |
|
BrowserKitDriver:: |
private | function | Gets the value of an option element | |
BrowserKitDriver:: |
public | function |
Returns element's outer html by it's XPath query. Overrides CoreDriver:: |
|
BrowserKitDriver:: |
protected | function | ||
BrowserKitDriver:: |
public | function |
Returns last response headers. Overrides CoreDriver:: |
|
BrowserKitDriver:: |
public | function |
Returns last response status code. Overrides CoreDriver:: |
|
BrowserKitDriver:: |
public | function |
Returns element's tag name by it's XPath query. Overrides CoreDriver:: |
|
BrowserKitDriver:: |
public | function |
Returns element's text by it's XPath query. Overrides CoreDriver:: |
|
BrowserKitDriver:: |
public | function |
Returns element's value by it's XPath query. Overrides CoreDriver:: |
|
BrowserKitDriver:: |
public | function |
Checks whether checkbox or radio button located by it's XPath query is checked. Overrides CoreDriver:: |
|
BrowserKitDriver:: |
public | function |
Checks whether select option, located by it's XPath query, is selected. Overrides CoreDriver:: |
|
BrowserKitDriver:: |
public | function |
Checks whether driver is started. Overrides CoreDriver:: |
|
BrowserKitDriver:: |
private | function | Merges second form values into first one. | |
BrowserKitDriver:: |
public | function |
Reloads current page. Overrides CoreDriver:: |
|
BrowserKitDriver:: |
private | function | ||
BrowserKitDriver:: |
public | function |
Selects option from select field or value in radio group located by it's XPath query. Overrides CoreDriver:: |
|
BrowserKitDriver:: |
public | function |
Sets cookie. Overrides CoreDriver:: |
|
BrowserKitDriver:: |
public | function | Tells driver to remove hostname from URL. | |
BrowserKitDriver:: |
public | function | Tells driver to remove script name from URL. | |
BrowserKitDriver:: |
public | function |
Sets specific request header on client. Overrides CoreDriver:: |
|
BrowserKitDriver:: |
public | function |
Sets element's value by it's XPath query. Overrides CoreDriver:: |
|
BrowserKitDriver:: |
public | function |
Starts driver. Overrides CoreDriver:: |
|
BrowserKitDriver:: |
public | function |
Stops driver. Overrides CoreDriver:: |
|
BrowserKitDriver:: |
private | function | ||
BrowserKitDriver:: |
public | function |
Submits the form. Overrides CoreDriver:: |
|
BrowserKitDriver:: |
public | function |
Unchecks checkbox by it's XPath query. Overrides CoreDriver:: |
|
BrowserKitDriver:: |
public | function |
Visit specified URL. Overrides CoreDriver:: |
|
CoreDriver:: |
private | property | 1 | |
CoreDriver:: |
public | function |
Removes focus from element. Overrides DriverInterface:: |
1 |
CoreDriver:: |
public | function |
Double-clicks button or link located by it's XPath query. Overrides DriverInterface:: |
|
CoreDriver:: |
public | function |
Drag one element onto another. Overrides DriverInterface:: |
1 |
CoreDriver:: |
public | function |
Evaluates JS script. Overrides DriverInterface:: |
|
CoreDriver:: |
public | function |
Executes JS script. Overrides DriverInterface:: |
|
CoreDriver:: |
public | function |
Finds elements with specified XPath query. Overrides DriverInterface:: |
1 |
CoreDriver:: |
public | function |
Brings focus to element. Overrides DriverInterface:: |
1 |
CoreDriver:: |
public | function |
Capture a screenshot of the current window. Overrides DriverInterface:: |
|
CoreDriver:: |
public | function |
Return the name of the currently active window. Overrides DriverInterface:: |
|
CoreDriver:: |
public | function |
Return the names of all open windows. Overrides DriverInterface:: |
|
CoreDriver:: |
public | function |
Checks whether element visible located by it's XPath query. Overrides DriverInterface:: |
1 |
CoreDriver:: |
public | function |
Pressed down specific keyboard key. Overrides DriverInterface:: |
|
CoreDriver:: |
public | function |
Presses specific keyboard key. Overrides DriverInterface:: |
|
CoreDriver:: |
public | function |
Pressed up specific keyboard key. Overrides DriverInterface:: |
|
CoreDriver:: |
public | function |
Maximizes the window if it is not maximized already. Overrides DriverInterface:: |
|
CoreDriver:: |
public | function |
Simulates a mouse over on the element. Overrides DriverInterface:: |
|
CoreDriver:: |
public | function |
Set the dimensions of the window. Overrides DriverInterface:: |
|
CoreDriver:: |
public | function |
Right-clicks button or link located by it's XPath query. Overrides DriverInterface:: |
|
CoreDriver:: |
public | function |
Sets driver's current session. Overrides DriverInterface:: |
1 |
CoreDriver:: |
public | function |
Switches to specific iFrame. Overrides DriverInterface:: |
1 |
CoreDriver:: |
public | function |
Switches to specific browser window. Overrides DriverInterface:: |
|
CoreDriver:: |
public | function |
Waits some time or until JS condition turns true. Overrides DriverInterface:: |
|
GoutteDriver:: |
public | function |
Gets the Goutte client. Overrides BrowserKitDriver:: |
|
GoutteDriver:: |
protected | function |
Prepares URL for visiting.
Removes "*.php/" from urls and then passes it to BrowserKitDriver::visit(). Overrides BrowserKitDriver:: |
|
GoutteDriver:: |
public | function |
Resets driver state. Overrides BrowserKitDriver:: |
|
GoutteDriver:: |
public | function |
Sets HTTP Basic authentication parameters. Overrides BrowserKitDriver:: |
|
GoutteDriver:: |
public | function |
Initializes Goutte driver. Overrides BrowserKitDriver:: |