Screenshot with phpunit and selenium RC
require_once 'PHPUnit/Extensions/SeleniumTestCase.php';
class yourTest extends PHPUnit_Extensions_SeleniumTestCase {
...
/**
* On teardown, capture a screenshot.
*/
public function tearDown() {
file_put_contents('result.png', base64_decode($this->captureEntirePageScreenshotToString()));
}
}
class yourTest extends PHPUnit_Extensions_SeleniumTestCase {
...
/**
* On teardown, capture a screenshot.
*/
public function tearDown() {
file_put_contents('result.png', base64_decode($this->captureEntirePageScreenshotToString()));
}
}
comments (0)