Chris@0
|
1 Mink PhantomJS Driver
|
Chris@0
|
2 ===========================
|
Chris@0
|
3 [](https://travis-ci.org/jcalderonzumba/MinkPhantomJSDriver)
|
Chris@0
|
4 [](https://scrutinizer-ci.com/g/jcalderonzumba/MinkPhantomJSDriver/?branch=master)
|
Chris@0
|
5 [](https://packagist.org/packages/jcalderonzumba/mink-phantomjs-driver)
|
Chris@0
|
6 [](https://packagist.org/packages/jcalderonzumba/mink-phantomjs-driver)
|
Chris@0
|
7
|
Chris@0
|
8 Installation & Compatibility
|
Chris@0
|
9 ----------------------------
|
Chris@0
|
10 You need a working installation of [PhantomJS](http://phantomjs.org/download.html)
|
Chris@0
|
11
|
Chris@0
|
12 This driver is tested using PhantomJS 1.9.8 but it should work with 1.9.X or latest 2.0.X versions
|
Chris@0
|
13
|
Chris@0
|
14 This driver supports **PHP 5.4 or greater**, there is NO support for PHP 5.3
|
Chris@0
|
15
|
Chris@0
|
16 Use [Composer](https://getcomposer.org/) to install all required PHP dependencies:
|
Chris@0
|
17
|
Chris@0
|
18 ```bash
|
Chris@0
|
19 $ composer require --dev behat/mink jcalderonzumba/mink-phantomjs-driver
|
Chris@0
|
20 ```
|
Chris@0
|
21
|
Chris@0
|
22 How to use
|
Chris@0
|
23 -------------
|
Chris@0
|
24 Extension configuration (for the moment NONE).
|
Chris@0
|
25 ```yml
|
Chris@0
|
26 default:
|
Chris@0
|
27 extensions:
|
Chris@0
|
28 Zumba\PhantomJSExtension:
|
Chris@0
|
29 ```
|
Chris@0
|
30 Driver specific configuration:
|
Chris@0
|
31 ```yml
|
Chris@0
|
32 Behat\MinkExtension:
|
Chris@0
|
33 phantomjs:
|
Chris@0
|
34 phantom_server: "http://localhost:8510/api"
|
Chris@0
|
35 template_cache: "/tmp/pjsdrivercache/phantomjs"
|
Chris@0
|
36 ```
|
Chris@0
|
37 PhantomJS browser start:
|
Chris@0
|
38 ```bash
|
Chris@0
|
39 phantomjs --ssl-protocol=any --ignore-ssl-errors=true vendor/jcalderonzumba/gastonjs/src/Client/main.js 8510 1024 768 2>&1 >> /tmp/gastonjs.log &
|
Chris@0
|
40 ```
|
Chris@12
|
41 Driver instantiation:
|
Chris@12
|
42 ```php
|
Chris@12
|
43 $driver = new Zumba\Mink\Driver\PhantomJSDriver('http://localhost:8510');
|
Chris@12
|
44 ```
|
Chris@0
|
45
|
Chris@0
|
46 FAQ
|
Chris@0
|
47 ---------
|
Chris@0
|
48
|
Chris@0
|
49 1. Is this a selenium based driver?:
|
Chris@0
|
50
|
Chris@0
|
51 **NO**, it has nothing to do with Selenium it's inspired on [Poltergeist](https://github.com/teampoltergeist/poltergeist)
|
Chris@0
|
52
|
Chris@0
|
53 2. What features does this driver implements?
|
Chris@0
|
54
|
Chris@0
|
55 **ALL** of the features defined in Mink DriverInterface. maximizeWindow is the only one not implemented since is a headless browser it does not make sense to implement it.
|
Chris@0
|
56
|
Chris@0
|
57 3. Do i need to modify my selenium based tests?
|
Chris@0
|
58
|
Chris@0
|
59 If you only use the standard behat driver defined methods then NO, you just have to change your default javascript driver.
|
Chris@0
|
60
|
Chris@0
|
61
|
Chris@0
|
62 Copyright
|
Chris@0
|
63 ---------
|
Chris@0
|
64
|
Chris@0
|
65 Copyright (c) 2015 Juan Francisco Calderon Zumba <juanfcz@gmail.com>
|