src/Browser.php
public function storeConsoleLog($name)
    {
        if (in_array($this->driver->getCapabilities()->getBrowserName(), static::$supportsRemoteLogs)) {
            $console = $this->driver->manage()->getLog('browser');

            if (! empty($console)) {
                file_put_contents(
                    sprintf('%s/%s.log', rtrim(static::$storeConsoleLogAt, '/'), $name), json_encode($console, JSON_PRETTY_PRINT)
                );
            }
        }

        return $this;
    }
public function storeConsoleLog($name)
    {
        if (in_array($this->driver->getCapabilities()->getBrowserName(), static::$supportsRemoteLogs)) {
            $console = $this->driver->manage()->getLog('browser');

            if (! empty($console)) {
                file_put_contents(
                    sprintf('%s/%s.log', rtrim(static::$storeConsoleLogAt, '/'), $name), json_encode($console, JSON_PRETTY_PRINT)
                );
            }
        }

        return $this;
    }
public function storeConsoleLog ( $ name ) { if ( in_array ( $ this -> driver -> getCapabilities ( ) -> getBrowserName ( ) , static :: $ supportsRemoteLogs ) ) { $ console = $ this -> driver -> manage ( ) -> getLog ( 'browser' ) ; if ( ! empty ( $ console ) ) { file_put_contents ( sprintf ( '%s/%s.log' , rtrim ( static :: $ storeConsoleLogAt , '/' ) , $ name ) , json_encode ( $ console , JSON_PRETTY_PRINT ) ) ; } } return $ this ; }
Store the console output with the given name.

@param  string  $name
@return $this
Store the console output with the given name .