behat / mink-zombie-driver
Zombie.js driver for Mink framework
Installs: 2 015 802
Dependents: 20
Suggesters: 4
Security: 0
Stars: 41
Watchers: 11
Forks: 49
Open Issues: 17
Type:mink-driver
Requires
- php: >=7.2
- ext-json: *
- ext-sockets: *
- behat/mink: ~1.9@dev
- symfony/process: ^4.4 || ^5.0 || ^6.0
Requires (Dev)
- mink/driver-testsuite: dev-master
- phpunit/phpunit: ^8.5.22 || ^9.5.11
- symfony/error-handler: ^4.4.36 || ^5.4.2 || ^6.0.2
README
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 b00gizm@gmail.com
Maintainers
- Alexander Obuhovich aik099