PHP code example of mazelab / phantomjsstarter
1. Go to this page and download the library: Download mazelab/phantomjsstarter 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/ */
mazelab / phantomjsstarter example snippets
class FeatureContext extends MinkContext
{
/** @BeforeSuite */
public static function setup(SuiteEvent $event)
{
// this will set the port
$phantomjs = new Mazelab\Phantomjs\Starter(8643);
$phantomjs->up();
}
/** @BeforeSuite */
public static function setup2(SuiteEvent $event)
{
// this will set the port and tells the starter
// to use the binary from node_modules/.bin
$phantomjs = new Mazelab\Phantomjs\Starter(8643, null, 'node_modules/.bin/phantomjs');
$phantomjs->up();
}
...