Mink travis-ci Packagist phpunit

PHP 5.3+ web browser emulator abstraction

Mink

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

Useful Links

Usage Example

<?php

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

$startUrl = 'http://example.com';

// 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
$mink->setDefaultSessionName('goutte2');

// visit a page
$mink->getSession()->visit($startUrl);

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

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

// this all is done to make possible mixing sessions
$mink->getSession('goutte1')->getPage()->findLink('Chat')->click();
$mink->getSession('goutte2')->getPage()->findLink('Chat')->click();

Install Dependencies

$> curl -sS https://getcomposer.org/installer | php
$> php composer.phar install

Contributors

Related Repositories

Mink

Mink

PHP 5.3+ web browser emulator abstraction ...

MinkExtension

MinkExtension

Mink extension (tight integration and configuration) for Behat ...

drupalextension

drupalextension

An integration layer between Behat, Mink Extension, and Drupal. ...

docs

docs

Mink documentation ...

MinkBundle

MinkBundle

Mink library integration bundle for Symfony2 ...


Top Contributors

everzet stof aik099 alexandresalome b00giZm handrus schmittjoh zombor xmeltrut robsquires raspberryman gimler robocoder benja-M-1 grahambates jdreesen mdhooge proofek docteurklein hidenorigoto radepal asm89 neochief anbotero robo47 clemherreman djacquel ThePixelDeveloper pgodel pete-otaqui

Releases

-   v1.6.0 zip tar
-   v1.5.0 zip tar
-   v1.4.3 zip tar
-   v1.4.2 zip tar
-   v1.4.1 zip tar
-   v1.4.0 zip tar
-   v1.4.0beta5 zip tar
-   v1.4.0beta4 zip tar
-   v1.4.0beta3 zip tar
-   v1.4.0beta2 zip tar
-   v1.4.0beta1 zip tar
-   v1.3.4 zip tar
-   v1.3.3 zip tar
-   v1.3.2 zip tar
-   v1.3.1 zip tar
-   v1.3.0 zip tar
-   v1.2.0 zip tar
-   v1.1.1 zip tar
-   v1.1.0 zip tar
-   v1.0.4 zip tar
-   v1.0.3 zip tar
-   v1.0.2 zip tar
-   v1.0.1 zip tar
-   v1.0.0 zip tar
-   v0.3.2 zip tar
-   v0.3.1 zip tar
-   v0.3.0 zip tar
-   v0.2.4 zip tar
-   v0.2.3 zip tar
-   v0.2.2 zip tar