PHP code example of drewwalton19216801 / mink-zombie-driver
1. Go to this page and download the library: Download drewwalton19216801/mink-zombie-driver library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
drewwalton19216801 / mink-zombie-driver example snippets
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();