Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Zombie.js driver for Mink framework

Notifications You must be signed in to change notification settings

Behat/MinkZombieDriver

 
 

Repository files navigation

Mink Zombie.js Driver

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

Installation & Compatibility

You need a working installation of NodeJS and npm. Install the zombie.js library through npm:

npm install -g zombie

The driver requires zombie.js version 2.0.0 or higher.

Use Composer to install all required PHP dependencies:

{
    "require": {
        "behat/mink":               "~1.6",
        "behat/mink-zombie-driver": "~1.2"
    }
}
$> curl -sS https://getcomposer.org/installer | php
$> php composer.phar install

Usage Example

<?php

use Behat\Mink\Mink,
    Behat\Mink\Session,
    Behat\Mink\Driver\ZombieDriver,
    Behat\Mink\Driver\NodeJS\Server\ZombieServer;

$host       = '127.0.0.1';
$port       = '8124';
$nodeBinary = '/usr/local/bin/node';

$mink = new Mink(array(
    'zombie' => new Session(new ZombieDriver(new ZombieServer(
        $host, $port, $nodeBinary
    ))),
));

$mink->setDefaultSessionName('zombie');

$session = $mink->getSession();
$session->visit('http://example.org');

$page = $session->getPage();
$elem = $page->find('css', 'h1');

echo $elem->getText();

Copyright

Copyright (c) 2011-2012 Pascal Cremer [email protected]

Maintainers

About

Zombie.js driver for Mink framework

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 99.6%
  • JavaScript 0.4%