public function screenshotAsImage($asBase64 = false)
    {
        $image = $this->getDriver()->curl(
            $this->getDriver()->factoryCommand('screenshot', WebDriver_Command::METHOD_GET)
        );
        $image = $image['value'];
        if (!$asBase64) {
            $image = base64_decode($image);
        }
        return $image;
    }