2017 © Pedro Peláez
 

library php-webdriver-journal

A journaling proxy object over the Facebook's WebDriver

image

ikr/php-webdriver-journal

A journaling proxy object over the Facebook's WebDriver

  • Thursday, July 9, 2015
  • by ikr
  • Repository
  • 1 Watchers
  • 0 Stars
  • 53 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

Build Status, (*1)

Summary

A journaling proxy to the Facebook's WebDriver. Wraps a WebDriver instance, and complements the original method calls with taking screen-shots, and capturing the browser log messages. As the result, a journal of the executed browser session is created: an HTML document with embedded screen-shots, DOM query records, console messages, etc., (*2)

Why?

We have an automatic headless screen-scraping tool implemented with Selenium + PhantomJS (no idea why PhantomJS by itself wasn't enough). Sometimes it screws up: ticket order fails, wrong kind of tickets gets selected, or a child name gets confused with an adult name. This tool is summoned to ease the debugging of such failures., (*3)

Installation

$ composer require ikr/php-webdriver-journal

API

$driver = \RemoteWebDriver::create(
    $seleniumHubUrl,
    \DesiredCapabilities::phantomjs()
);

$wrappedDriver = new \WebDriverJournal\WebDriverProxy(
    $driver,

    new \WebDriverJournal\Probe(
        $driver,

        new \WebDriverJournal\Journal(
            new \WebDriverJournal\DirectoryFilesWriter(
                '/tmp/web-driver-journals',
                $browserSessionIdOfYourChoice
            )
        )
    )
);

$wrappedDriver->manage()->window()->setSize(new \WebDriverDimension(1024, 1024));
$wrappedDriver->manage()->timeouts()->implicitlyWait(8);

$wrappedDriver->get('https://ikr.su/');
$wrappedDriver->findElement(\WebDriverBy::id('btn-next'))->click();
// ...
$wrappedDriver->quit();

Maturity

Still experimental: v0.1.x, (*4)

The Versions

09/07 2015

dev-master

9999999-dev

A journaling proxy object over the Facebook's WebDriver

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ivan Krechetov

09/07 2015

v0.1.4

0.1.4.0

A journaling proxy object over the Facebook's WebDriver

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ivan Krechetov

09/07 2015

v0.1.3

0.1.3.0

A journaling proxy object over the Facebook's WebDriver

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ivan Krechetov

09/07 2015

v0.1.2

0.1.2.0

A journaling proxy object over the Facebook's WebDriver

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ivan Krechetov

09/07 2015

v0.1.1

0.1.1.0

A journaling proxy object over the Facebook's WebDriver

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ivan Krechetov

09/07 2015

v0.1.0

0.1.0.0

A journaling proxy object over the Facebook's WebDriver

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ivan Krechetov