protected function createScreenshot()
    {
        $image = imagecreatefromstring($this->webDriver->screenshotAsImage());
        if (false === $image) {
            throw new WebDriver_Exception("Invalid screenshot data");
        }
        return $image;
    }