behat/mink-browserkit-driver
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|---|---|---|---|---|
symfony/browser-kit | v7.0.7 | - | MIT | prod | |
symfony/dom-crawler | v7.0.7 | - | MIT | prod |
The behat/mink-browserkit-driver is a Symfony2 BrowserKit driver for the Mink framework. It effectively allows for web acceptance testing, providing the capability to simulate user interaction with a web application. The package provides an interface to control the Symfony2 BrowserKit, emulating the behavior of an actual web browser, making it critical for testing the web applications without requiring an actual browser instance.
To use the behat/mink-browserkit-driver, you need to have Composer installed in your project. You can add the driver to your project by executing the command line composer require --dev behat/mink behat/mink-browserkit-driver
. Once you've installed the driver, you can use it in your PHP application as below:
<?php
use Behat\Mink\Mink,
Behat\Mink\Session,
Behat\Mink\Driver\BrowserKitDriver;
use Symfony\Component\HttpKernel\Client;
$app = require_once(__DIR__.'/app.php'); // Silex app
$mink = new Mink(array(
'silex' => new Session(new BrowserKitDriver(new Client($app))),
));
$mink->getSession('silex')->getPage()->findLink('Chat')->click();
The above code initiates a new Mink operation with an embedded BrowserKit session. It then locates and clicks on a link labeled 'Chat' on the webpage.
The documentation of behat/mink-browserkit-driver can be found directly in the source code and README of the package on the GitHub repository. It is primarily maintained by the open-source community. Visit the GitHub repository for the most up-to-date information and usage instructions: https://github.com/minkphp/MinkBrowserKitDriver.