PHPUnit_Framework_Exception: Response from Selenium RC server for testComplete().
ERROR: Command execution failure. Please search the forum at http://clearspace.openqa.org for error details from the log window.
The error message is: Component returned failure code: 0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH) [nsILocalFile.initWithPath]

Setting up Selenium RC server together with PHPUnit has proven surprisingly easy… Well most of it. Every now and then as a beginner you might run into monster errors like the one above. No fear, what Selenium is trying to tell you is just that your path is wrong.

For me it happened when trying to setup the error screenshot variables:

protected $captureScreenshotOnFailure = TRUE;
<strong>protected $screenshotPath = '/var/www/localhost/htdocs/screenshots';</strong>
protected $screenshotUrl = 'http://localhost/screenshots';

In case you wonder the path relates to the browser’s host not the Selenium RC host (if they are different), In my case the browsers are run on a windows box, with the Selenium RC setup on a Linux machine. Thus the error about the inapropriate $screenshotPath.