Log in Register now

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()));
}
}

comments (0)

Only registered users can add comments. Please, Login or Register.