this allows me to interactively drive the browser from phpsh (http://www.phpsh.org/), like so: require_once 'PHPUnit/Autoload.php'; $driver = new PHPUnit_Extensions_SeleniumTestCase_Driver(); $driver->setBrowser('*firefox'); $driver->setBrowserUrl('http://www.facebook.com'); $driver->setHost('localhost'); $driver->setPort(4444); $driver->setTimeout(30); $driver->setHttpTimeout(45); $driver->start(); $driver->open('http://www.google.com'); by simply not requiring that there be a testCase when running the driver...
enable code completion in IDE.
…s passed to PHPUnit_Framework_Assert::assertTrue and assertFalse. This makes debugging boolean assert failures easier.
* Fix a bug in the usage of stream_set_timeout(). Given that httpTimeout is in seconds and the second argument of stream_set_timeout() is in microseconds the multiplier should be 1000000, not 1000. Or even better it should be stream_set_timeout($handle, $this->httpTimeout); * Fix a deadlock which was previously masked by a very short timeout which resulted in truncated replies received sometimes. A deadlock occurs between the PHP web client and the Selenium RC web server, each one waiting for more data from the other. This is because the limited web server does not parse our HTTP request on the fly but instead waits for us to shutdown the socket for writing in order to start processing the request. The solution is to shutdown the socket for writing (telling the other side that we are not going to send anything more) as soon as we have sent the HTTP request which I believe is done by fopen(). * Simplification: use stream_get_contents() to read the reply instead of looping until end of file.