src/Bex/Behat/ScreenshotExtension/Service/ScreenshotTaker.php
public function takeScreenshot()
    {
        try {
            $this->screenshots[] = $this->mink->getSession()->getScreenshot();
        } catch (UnsupportedDriverActionException $e) {
            return;
        } catch (\Exception $e) {
            $this->output->writeln($e->getMessage());
        }        
    }
public function takeScreenshot()
    {
        try {
            $this->screenshots[] = $this->mink->getSession()->getScreenshot();
        } catch (UnsupportedDriverActionException $e) {
            return;
        } catch (\Exception $e) {
            $this->output->writeln($e->getMessage());
        }        
    }
public function takeScreenshot ( ) { try { $ this -> screenshots [ ] = $ this -> mink -> getSession ( ) -> getScreenshot ( ) ; } catch ( UnsupportedDriverActionException $ e ) { return ; } catch ( \ Exception $ e ) { $ this -> output -> writeln ( $ e -> getMessage ( ) ) ; } }
Save the screenshot into a local buffer
Save the screenshot into a local buffer