https://github.com/robertfausk/mink-panther-driver
Symfony Panther driver for Mink framework
https://github.com/robertfausk/mink-panther-driver
behat chromedriver e2e-testing mink mink-driver php symfony symfony-panther
Last synced: about 2 months ago
JSON representation
Symfony Panther driver for Mink framework
- Host: GitHub
- URL: https://github.com/robertfausk/mink-panther-driver
- Owner: robertfausk
- License: mit
- Created: 2018-10-23T18:56:51.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2025-04-04T08:17:21.000Z (6 months ago)
- Last Synced: 2025-07-26T13:42:14.321Z (3 months ago)
- Topics: behat, chromedriver, e2e-testing, mink, mink-driver, php, symfony, symfony-panther
- Language: PHP
- Homepage: https://packagist.org/packages/robertfausk/mink-panther-driver
- Size: 118 KB
- Stars: 12
- Watchers: 2
- Forks: 9
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# MinkPantherDriver
[](https://packagist.org/packages/robertfausk/mink-panther-driver)
[](https://packagist.org/packages/robertfausk/mink-panther-driver)
[](https://packagist.org/packages/robertfausk/mink-panther-driver)
[](https://img.shields.io/packagist/dm/robertfausk/mink-panther-driver)
[](https://img.shields.io/packagist/dm/robertfausk/mink-panther-driver)
[](https://github.com/robertfausk/mink-panther-driver/actions/workflows/ci.yml)
[](https://scrutinizer-ci.com/g/robertfausk/mink-panther-driver/)
[](https://scrutinizer-ci.com/g/robertfausk/mink-panther-driver/)
[](LICENSE)
[](https://packagist.org/packages/robertfausk/mink-panther-driver)
[](https://github.com/robertfausk/mink-panther-driver/issues)
[](https://github.com/robertfausk/mink-panther-driver/issues?q=is%3Aissue+is%3Aclosed)
[](https://github.com/robertfausk/mink-panther-driver/graphs/contributors)

[](https://packagist.org/packages/robertfausk/mink-panther-driver/dependents)Symfony Panther driver for Mink framework
## Install
composer require --dev robertfausk/mink-panther-driver
Usage Example
-------------```PHP
__DIR__.'/../../../../public', // the Flex directory structure
'hostname' => '127.0.0.1',
'port' => 9080,
'router' => '',
'external_base_uri' => null,
'readinessPath' => '',
'browser' => PantherTestCase::CHROME,
];
$kernelOptions = []; # unused cause we do not extend class KernelTestCase
$managerOptions = [];$mink = new Mink(array(
'panther' => new Session(new PantherDriver($defaultOptions, $kernelOptions, $managerOptions)),
));$mink->getSession('panther')->getPage()->findLink('Chat')->click();
```Please refer to [MinkExtension-example](https://github.com/Behat/MinkExtension-example) for an executable example.
## Documentation
Since MinkPantherDriver is just glue between Mink and Symfony Panther, it already has an extensive documentation:
* For `Mink` , read [Mink's documentation](http://mink.behat.org/en/latest/).
* For `symfony/panther`, read [Panther's documentation](https://github.com/symfony/panther).
* For usage with `Behat`, read [Behat's documentation](http://behat.org/en/latest/guides.html)
and give [robertfausk/behat-panther-extension](https://github.com/robertfausk/behat-panther-extension) a try.### How to upgrade?
Have a look at [CHANGELOG](CHANGELOG.md) for detailed information.
## How to contribute?
Start docker-compose with php web driver by using one of the prepared docker setups with php7.2, php7.3, php7.4, php8.0, php8.1 or php8.2.
docker-compose up php8.4
Run phpunit tests
docker-compose exec php8.4 vendor/bin/phpunit
If you run into issues of type ```session not created: This version of ChromeDriver only supports Chrome version 79```
then it is because of mismatched versions between installed chrome driver and chromium.
Best way to bypass this problem is to update them to their newest version.docker-compose exec php8.4 composer update
docker-compose exec php8.4 vendor/bin/bdi detect drivers## Credits
Created by Robert Freigang [robertfausk](https://github.com/robertfausk).
MinkPantherDriver is built on top of [Panther](https://github.com/symfony/panther) and for usage with [Behat and Mink](http://behat.org/en/latest/cookbooks/integrating_symfony2_with_behat.html#initialising-behat).
It has been inspired by [MinkBrowserKitDriver](https://github.com/minkphp/MinkBrowserKitDriver) and [MinkSelenium2Driver](https://github.com/minkphp/MinkSelenium2Driver).