Browser controller/emulator abstraction for PHP

Installs: 2 777 665

Dependents: 231

Stars: 690

Watchers: 42

Forks: 190

Open Issues: 54

v1.7.0 2015-09-20 20:24 UTC


Latest Stable Version Latest Unstable Version Total Downloads Scrutinizer Code Quality Code Coverage Build Status SensioLabsInsight License

Useful Links

Usage Example


use Behat\Mink\Mink,
    Behat\Mink\Driver\Goutte\Client as GoutteClient;

$startUrl = '';

// init Mink and register sessions
$mink = new Mink(array(
    'goutte1' => new Session(new GoutteDriver(new GoutteClient())),
    'goutte2' => new Session(new GoutteDriver(new GoutteClient())),
    'custom'  => new Session(new MyCustomDriver($startUrl))

// set the default session name

// visit a page

// call to getSession() without argument will always return a default session if has one (goutte2 here)
echo $mink->getSession()->getPage()->getContent();

// call to getSession() with argument will return session by its name
echo $mink->getSession('custom')->getPage()->getContent();

// this all is done to make possible mixing sessions

Install Dependencies

$> curl -sS | php
$> php composer.phar install