2017 © Pedro Peláez
 

library mink-electron-driver

Mink Electron Driver

image

uuf6429/mink-electron-driver

Mink Electron Driver

  • Saturday, February 3, 2018
  • by uuf6429
  • Repository
  • 2 Watchers
  • 1 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 15 Open issues
  • 13 Versions
  • 0 % Grown

The README.md

Mink Electron Driver

Build Status (Linux / TravisCI) Build Status (Windows / AppVeyor) Minimum PHP Version License Coverage Packagist Dependency Status, (*1)

Mink Electron Driver (replaces JsonWireProtocol and PhantomJS with Electron), (*2)

Electron is between 2 to 3 times faster than PhantomJS (source)., (*3)

Table Of Contents

Features and Advantages

  • Fully-featured web browser
  • Quite fast, compared to alternatives
  • Built with modern components
  • Well supported (Electron receives frequent updates)
  • Easily understandable codebase (it's either PHP or JS)
  • Well tested (in addition to Mink driver tests, there are others)

Requirements

There a few things which are not taken care of automatically depending on your system., (*4)

  • Basics
    • PHP (5.5+) and Composer
    • Node.js (4+) and npm
  • Linux
    • If run headless (ie, without a desktop) you need to install xvfb
    • Some libraries are required, more details here
  • Windows

Installation

First make sure that the requirements above are met., (*5)

Next, simply install the driver in your Behat project via Composer:, (*6)

composer require uuf6429/mink-electron-driver

How Does It Work?

       PHP + Mink Driver Interface                    Node.js + Electron API
 ________________  |  ______________________     _____________  |  _______________ 
|  Behat + Mink  |_v_|       Client         |___|    Server   |_V_|   Electron    |
| (Your Project) |---| (ElectronDriver.php) |---| (Server.js) |---| (Web Browser) |
'----------------'   '----------------------' ^ '-------------'   '---------------'
                                              |
                      DNode comm. over UDS (with inet sockets fallback)

Since one cannot easily control Node.js from PHP, a client-server approach was taken, with a fast and lightweight transport (unix domain sockets) protocol (dnode)., (*7)

The driver on the PHP side simply tells the server what to do and it controls the Electron web browser., (*8)

The main reason why a client-server approach was taken is that Mink is synchronous by design., (*9)

The Versions

27/05 2017
28/04 2017

dev-Frame-manager-(fixes-#19-and-#20)

dev-Frame-manager-(fixes-#19-and-#20)

Mink Electron Driver

  Sources   Download

MIT

The Requires

 

The Development Requires

06/04 2017