Run and/or control a web driver programmatically.
- PHP >= 5.6.4
You may install this package using composer.
$ composer require bhittani/web-driver --prefer-dist
$ vendor/bin/install-chrome-driver
$ vendor/bin/install-phantomjs-driver
This package conveniently wraps the Facebook's PHP Web Driver and by default offers drivers for chrome and phantomjs.
First ensure you have installed the chrome driver.
<?php
use Bhittani\WebDriver\Chrome;
$driver = Chrome::make();
First ensure you have installed the phantomjs driver.
<?php
use Bhittani\WebDriver\Phantomjs;
$driver = Phantomjs::make();
All driver instances extend Facebook\WebDriver\Remote\RemoteWebDriver
, hence, the same API applies.
<?php
$googleDotCom = $driver->get('https://google.com');
$googleDotCom->getTitle(); // 'Google'
- Document the usage of process.
- Document the usage of custom ports.
- Document the usage of payload (chrome)
Please see CHANGELOG for more information on what has changed.
$ git clone https://github.com/kamalkhan/web-driver
$ cd web-driver
$ composer install
$ composer install-drivers
$ composer test
Please see CONTRIBUTING and CONDUCT for details.
If you discover any security related issues, please email shout@bhittani.com
instead of using the issue tracker.
The MIT License (MIT). Please see the License File for more information.