Main » Articles » Programming » PHP |
Entries in category: 1 Shown entries: 1-1 |
Sort by: Date · Name · Rating · Comments · Views
PHP → 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()));
}
}