facebook/php-webdriver — Issue #13: More documentation on how to use driver
Author: daluu
Created: 2011-12-03 01:30:37+00:00
State: open

It would help if you provided more documentations on how to use the driver, particularly for novices of Web Driver. It looks like this driver requires use of the remote web driver and thus you need to have a remote web driver (server) session started on the localhost machine to test the driver with?

Would be nice if your provided simple example of that. Also nice to have example covering how to type into text field, click a checkbox, verify text on screen, etc.

Following these to start web driver server instance

http://code.google.com/p/selenium/wiki/RemoteWebDriverServer

or probably not this http://code.google.com/p/selenium/wiki/Grid2

and following your code snippet (for Web Driver) at

https://github.com/sebastianbergmann/phpunit-selenium/pull/59

I get exception when I call $session = $driver->session();

A Firefox browser does come up, but my PHP shell has already terminated from exception. Exception differs based on how I start up Web Driver (as remote server vs grid node). I'll post the exceptions separately.

FYI, I'm using Windows to run PHP and Web Driver. PHP shell via phpa-norl.php solution. phpa-norl worked fine for Selenium RC API following your shell patch/hack for PHPUnit, so shouldn't be an issue with phpa-norl here. I import your driver like this:

require_once 'C:\EclipseWrkSpc\StagingAreaForAutomationTestsTrunk\Extensions
\facebook-php-webdriver\__init__.php';