File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ BrowserKitDriver
2+ ================
3+
4+ BrowserKitDriver provides a bridge for the `Symfony BrowserKit `_ component.
5+ BrowserKit is a browser emulator provided by the `Symfony project `_.
6+
7+ Installation
8+ ------------
9+
10+ BrowserKitDriver is a pure PHP library available through Composer:
11+
12+ .. code-block :: bash
13+
14+ $ composer require behat/mink-browserkit-driver
15+
16+ .. note ::
17+
18+ The BrowserKit component only provides an abstract implementation. The
19+ actual implementation are provided by other projects, like `Goutte `_
20+ or the `Symfony HttpKernel `_ component.
21+
22+ If you are using Goutte, you should use the special :doc: `/drivers/goutte `
23+ which ensures full compatibility for Goutte due to an edge case in Goutte.
24+
25+ Usage
26+ -----
27+
28+ In order to talk with BrowserKit, you should instantiate a
29+ ``Behat\Mink\Driver\BrowserKitDriver ``:
30+
31+ .. code-block :: php
32+
33+ $browserkitClient = // ...
34+
35+ $driver = new \Behat\Mink\Driver\BrowserKitDriver($browserkitClient);
36+
37+ .. _Goutte : https://github.com/FriendsOfPHP/Goutte
38+ .. _Symfony BrowserKit : http://symfony.com/components/BrowserKit
39+ .. _Symfony HttpKernel : http://symfony.com/components/HttpKernel
40+ .. _Symfony project : http://symfony.com
Original file line number Diff line number Diff line change @@ -5,6 +5,12 @@ GoutteDriver provides a bridge for the `Goutte`_ headless browser. Goutte
55is a classical pure-php headless browser, written by the creator of the Symfony
66framework Fabien Potencier.
77
8+ .. note ::
9+
10+ The GoutteDriver extends the :doc: `/drivers/browserkit ` to fix a small
11+ edge case in the Goutte implementation of BrowserKit. It is also able
12+ to instantiate the Goutte client automatically.
13+
814Installation
915------------
1016
Original file line number Diff line number Diff line change @@ -9,12 +9,13 @@ Mink always talks with browser emulators through its driver. It doesn't know
99anything about how to start/stop or traverse page in that particular browser
1010emulator. It only knows what driver method it should call in order to do this.
1111
12- Mink comes with five drivers out of the box:
12+ Mink comes with six drivers out of the box:
1313
1414.. toctree ::
1515 :maxdepth: 1
1616
1717 /drivers/goutte
18+ /drivers/browserkit
1819 /drivers/selenium2
1920 /drivers/zombie
2021 /drivers/sahi
You can’t perform that action at this time.
0 commit comments