Coder Social home page Coder Social logo

minkzombiedriver's Introduction

Mink Zombie.js Driver

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

Installation & Compatibility

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

npm install -g zombie

There are some compatibility issues with older versions of zombie.js. Some are more or less PHP specific and kinda hard to resolve. If you want to be 100% on the safe side, please use version 2.0.0-alpha1 or higher.

Use Composer to install all required PHP dependencies:

{
    "require": {
        "behat/mink":               "~1.5",
        "behat/mink-zombie-driver": "~1.0"
    }
}
$> curl http://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

minkzombiedriver's People

Contributors

stof avatar everzet avatar b00gizm avatar faceleg avatar swestcott avatar mnapoli avatar olleolleolle avatar underq avatar gimler avatar lotyrin avatar ecentinela avatar linclark avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.