public function PageContentTrait::getScreenshot in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/jcalderonzumba/mink-phantomjs-driver/src/PageContentTrait.php \Zumba\Mink\Driver\PageContentTrait::getScreenshot()
Returns the binary representation of the current page we are in
Return value
string
Throws
File
- vendor/
jcalderonzumba/ mink-phantomjs-driver/ src/ PageContentTrait.php, line 64
Class
- PageContentTrait
- Class PageContentTrait @package Zumba\Mink\Driver
Namespace
Zumba\Mink\DriverCode
public function getScreenshot() {
$options = array(
"full" => true,
"selector" => null,
);
$b64ScreenShot = $this->browser
->renderBase64("JPEG", $options);
if (($binaryScreenShot = base64_decode($b64ScreenShot, true)) === false) {
throw new DriverException("There was a problem while doing the screenshot of the current page");
}
return $binaryScreenShot;
}