GoutteDriver provides a bridge for the Goutte headless browser. Goutte is a classical pure-php headless browser, written by the creator of the Symfony framework Fabien Potencier.


The GoutteDriver extends the BrowserKitDriver to fix a small edge case in the Goutte implementation of BrowserKit. It is also able to instantiate the Goutte client automatically.


GoutteDriver is a pure PHP library available through Composer:

$ composer require behat/mink-goutte-driver


GoutteDriver is compatible with both Goutte 1.x which relies on Guzzle 3 and Goutte 2.x which relies on Guzzle 4+ for the underlying HTTP implementation.

Composer will probably select Goutte 2.x by default.


In order to talk with Goutte, you should instantiate a Behat\Mink\Driver\GoutteDriver:

$driver = new \Behat\Mink\Driver\GoutteDriver();

Also, if you want to configure Goutte more precisely, you could do the full setup by hand:

$client = new \Goutte\Client();
// Do more configuration for the Goutte client

$driver = new \Behat\Mink\Driver\GoutteDriver($client);