getScreenshot is now in Session, not Driver

This commit is contained in:
Tony Rasmussen
2012-10-07 10:55:25 -07:00
parent da2e4ca85f
commit be9240abe0

View File

@@ -477,6 +477,6 @@ class MinkContext extends RawMinkContext implements TranslatedContextInterface
// No effect in other environments.
$filename = $filename ?: sprintf('%s_%s_%s.%s', $this->getMinkParameter('browser_name'), date('c'), uniqid('', true), 'png');
$filepath = $filepath ? $filepath : ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir();
file_put_contents($filepath . '/' . $filename, $this->getSession()->getDriver()->getScreenshot());
file_put_contents($filepath . '/' . $filename, $this->getSession()->getScreenshot());
}
}