{
if ( driver instanceof TakesScreenshot )
{
LOGGER.debug("Taking screenshot with driver " + driver.getTitle());
File attachment = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
SeleniumScreenshot screenshot = new SeleniumScreenshot(attachment, description, "image/png", attachment.getName());
this.addScreenShot(context, method, screenshot);
}
else
{
// We know usually the user wouldn't be able to use a HTML driver as