PHP code example of lctrs / mink-panther-driver

1. Go to this page and download the library: Download lctrs/mink-panther-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/ */

    

lctrs / mink-panther-driver example snippets




use Behat\Mink\Mink;
use Behat\Mink\Session;
use Lctrs\MinkPantherDriver\PantherDriver;

$mink = new Mink([
    'panther' => new Session(
        new PantherDriver(PantherDriver::CHROME)
    ),
]);



use Behat\Mink\Mink;
use Behat\Mink\Session;
use Lctrs\MinkPantherDriver\PantherDriver;

$mink = new Mink([
    'panther' => new Session(
        new PantherDriver(PantherDriver::FIREFOX)
    ),
]);



use Behat\Mink\Mink;
use Behat\Mink\Session;
use Facebook\WebDriver\Remote\DesiredCapabilities;
use Lctrs\MinkPantherDriver\PantherDriver;

$mink = new Mink([
    'panther' => new Session(
        new PantherDriver(PantherDriver::SELENIUM, [
            'host' => 'http://localhost:4444/wd/hub',
            'capabilities' => DesiredCapabilities::chrome(),
        ])
    ),
]);