BrowserKitDriver

BrowserKitDriver provides a bridge for the Symfony BrowserKit component. BrowserKit is a browser emulator provided by the Symfony project.

Installation

BrowserKitDriver is a pure PHP library available through Composer:

$ composer require behat/mink-browserkit-driver

Note

The BrowserKit component only provides an abstract implementation. The actual implementation are provided by other projects, like Goutte or the Symfony HttpKernel component.

If you are using Goutte, you should use the special GoutteDriver which ensures full compatibility for Goutte due to an edge case in Goutte.

Usage

In order to talk with BrowserKit, you should instantiate a Behat\Mink\Driver\BrowserKitDriver:

$browserkitClient = // ...

$driver = new \Behat\Mink\Driver\BrowserKitDriver($browserkitClient);