sebastianbergmann/phpunit-selenium — pull request #267 by dharrya (2013-08-14 19:10:05+00:00)
Title: Added command log() and logTypes() for Selenium2TestCase

This commands needed for retrieve JavaScript errors from WebDriver, look at JsonWireProtocol: https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/log
Just for simple example:
```php
class WebTest extends PHPUnit_Extensions_Selenium2TestCase
{
protected function setUp()
{
$this->setBrowser('chrome');
$this->setBrowserUrl('http://stuff-dharrya.rhcloud.com/get_js_error');
}

public function testTitle()
{
$this->url('http://stuff-dharrya.rhcloud.com/get_js_error');
print_r($this->logTypes());
print_r($this->log('browser'));
}
}
```
Will output:
```bash
Array
(
[0] => browser
[1] => client
[2] => server
)
Array
(
[0] => Array
(
[message] => http://stuff-dharrya.rhcloud.com/get_js_error 9 Uncaught ReferenceError: someVariable is not defined
[timestamp] => 1376507135656
[level] => SEVERE
)
)
```