PHP code example of behat / mink-goutte-driver
1. Go to this page and download the library: Download behat/mink-goutte-driver library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
behat / mink-goutte-driver example snippets
php
\Mink\Mink,
Behat\Mink\Session,
Behat\Mink\Driver\GoutteDriver,
Goutte\Client as GoutteClient;
$mink = new Mink(array(
'goutte' => new Session(new GoutteDriver(new GoutteClient())),
));
$session = $mink->getSession('goutte');
$session->visit("http://php.net/");
$session->getPage()->clickLink('Downloads');
echo $session->getCurrentUrl() . PHP_EOL;
bash
$> curl -sS https://getcomposer.org/installer | php
$> php composer.phar install