<?php
use Behat\Mink\Mink,
Behat\Mink\Session,
Mink\WebdriverClassicDriver\WebdriverClassicDriver;
require_once __DIR__ . '/vendor/autoload.php';
$browserName = 'firefox';
$url = 'http://example.com';
$mink = new Mink(array(
'webdriver-classic' => new Session(new WebdriverClassicDriver($browserName)),
));
$session = $mink->getSession('webdriver-classic');
$session->visit($url);
$session->getPage()->findLink('Chat')->click();
Please refer to MinkExtension-example for an executable example.
composer require behat/mink mink/webdriver-classic-driver
docker run -p 4444:4444 selenium/standalone-firefox:4.18.1
curl -L https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.18.0/selenium-server-4.18.1.jar > selenium-server-4.18.1.jar
java -jar selenium-server-4.18.1.jar standalone
./vendor/bin/mink-test-server
./vendor/bin/phpunit -v --coverage-clover=coverage.clover