RSS - Latest posts Archive for December, 2009

Home » Archive for December, 2009
16Dec
2009

Zend_Date time part and GMT

If you live in the UK you might have a surprise waiting in store for you if you use Zend_Date for the time part only. For a while I even thought this was a bug, however digging deeper has shown that actually it’s Zend_Date that is right, in a way at least.

When setting a time before 1972 – this is 1970 and 1971 the time part will not be shifted in the UK locale as DST was only introduced in 1972!

This means if you are only calculating times and need the appropriate time adjustment you will need to set a date as no date part in Zend_Date means 1st Jan 1970.

Categories:

15Dec
2009

PHPUnit & Selenium – screenshot path problem

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;
protected $screenshotPath = '/var/www/localhost/htdocs/screenshots';
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.

Categories: