2015-08-18 00:00:26 +00:00
|
|
|
Mink Goutte Driver
|
|
|
|
==================
|
|
|
|
|
|
|
|
[](https://packagist.org/packages/behat/mink-goutte-driver)
|
|
|
|
[](https://packagist.org/packages/behat/mink-goutte-driver)
|
|
|
|
[](https://packagist.org/packages/behat/mink-goutte-driver)
|
2015-08-27 19:03:05 +00:00
|
|
|
[](https://travis-ci.org/minkphp/MinkGoutteDriver)
|
|
|
|
[](https://scrutinizer-ci.com/g/minkphp/MinkGoutteDriver/)
|
|
|
|
[](https://scrutinizer-ci.com/g/minkphp/MinkGoutteDriver/)
|
2015-08-18 00:00:26 +00:00
|
|
|
[](https://packagist.org/packages/behat/mink-goutte-driver)
|
|
|
|
|
|
|
|
Usage Example
|
|
|
|
-------------
|
|
|
|
|
|
|
|
``` php
|
|
|
|
<?php
|
|
|
|
|
2015-08-27 19:03:05 +00:00
|
|
|
require "vendor/autoload.php";
|
|
|
|
|
2015-08-18 00:00:26 +00:00
|
|
|
use Behat\Mink\Mink,
|
|
|
|
Behat\Mink\Session,
|
|
|
|
Behat\Mink\Driver\GoutteDriver,
|
|
|
|
Behat\Mink\Driver\Goutte\Client as GoutteClient;
|
|
|
|
|
|
|
|
$mink = new Mink(array(
|
2015-08-27 19:03:05 +00:00
|
|
|
'goutte' => new Session(new GoutteDriver(new GoutteClient())),
|
2015-08-18 00:00:26 +00:00
|
|
|
));
|
|
|
|
|
2015-08-27 19:03:05 +00:00
|
|
|
$session = $mink->getSession('goutte');
|
|
|
|
$session->visit("http://php.net/");
|
|
|
|
$session->getPage()->clickLink('Downloads');
|
|
|
|
echo $session->getCurrentUrl() . PHP_EOL;
|
2015-08-18 00:00:26 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Installation
|
|
|
|
------------
|
|
|
|
|
2015-08-27 19:03:05 +00:00
|
|
|
Add a file composer.json with content:
|
|
|
|
|
2015-08-18 00:00:26 +00:00
|
|
|
``` json
|
|
|
|
{
|
|
|
|
"require": {
|
|
|
|
"behat/mink": "~1.5",
|
|
|
|
"behat/mink-goutte-driver": "~1.0"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2015-08-27 19:03:05 +00:00
|
|
|
(or merge the above into your project's existing composer.json file)
|
|
|
|
|
2015-08-18 00:00:26 +00:00
|
|
|
``` bash
|
|
|
|
$> curl -sS https://getcomposer.org/installer | php
|
|
|
|
$> php composer.phar install
|
|
|
|
```
|
|
|
|
|
|
|
|
Maintainers
|
|
|
|
-----------
|
|
|
|
|
2015-08-27 19:03:05 +00:00
|
|
|
* Christophe Coevoet [stof](https://github.com/stof)
|
|
|
|
* Other [awesome developers](https://github.com/minkphp/MinkGoutteDriver/graphs/contributors)
|