This package is abandoned and no longer maintained. No replacement package was suggested.

0.1.2 2016-02-26 14:49 UTC

This package is not auto-updated.

Last update: 2020-01-24 15:48:51 UTC


This project is not maintained anymore. If you want to take over contact us at

webnavigator Build Status

Wrapper for facebook/php-webdriver for simple automated acceptance tests.


WebNavigator can connect to the WebDriver server of PhantomJS. Start PhantomJS in a console like this:

phantomjs --webdriver=4444 --ssl-protocol=tlsv1 --ignore-ssl-errors=true


Setting up a WebNavigator instance in a PHPUnit test case and doing some basic tests:

class MyTest extends \PHPUnit_Framework_TestCase {

    /** @var \WebNavigator\Navigator */
    private $_navigator;

    protected function setUp() {
        $capabilities = new \DesiredCapabilities([\WebDriverCapabilityType::BROWSER_NAME => 'phantomjs']);
        $driver = \RemoteWebDriver::create('http://localhost:4444/wd/hub', $capabilities);
        $this->_navigator = new \WebNavigator\Navigator($driver, '');

    protected function tearDown() {

    public function testAddPage() {

        $this->_navigator->click('.addButton a');
        $this->assertContains('Event hinzufügen', $this->_navigator->getText('h1'));
        $this->assertContains('/add', $this->_navigator->getUrl());



Install dependencies:

composer install

Before running tests make sure you have phantomjs and a web server running:

phantomjs --webdriver=4444 &
php -S localhost:1234 -t tests/data/ &

Then run the tests:

php vendor/bin/phpunit