All Projects → minkphp → MinkZombieDriver

minkphp / MinkZombieDriver

Licence: other
Zombie.js driver for Mink framework

Programming Languages

PHP
23972 projects - #3 most used programming language
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to MinkZombieDriver

Mink
PHP web browser emulator abstraction
Stars: ✭ 1,492 (+3539.02%)
Mutual labels:  mink
phpunit-mink
Library for using Mink in PHPUnit tests. Supports session sharing between tests in a test case.
Stars: ✭ 71 (+73.17%)
Mutual labels:  mink
behat-3-kickstart
Behat 3/Mink and Guzzle for API testing. Code follows PageObjects approach. Saucelabs integration.
Stars: ✭ 13 (-68.29%)
Mutual labels:  mink

Mink Zombie.js Driver

Latest Stable Version Latest Unstable Version Total Downloads CI License codecov

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:

$ composer require --dev behat/mink behat/mink-zombie-driver

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].