src/Concerns/InteractsWithJavascript.php
public function script($scripts)
    {
        return collect((array) $scripts)->map(function ($script) {
            return $this->driver->executeScript($script);
        })->all();
    }
public function script($scripts)
    {
        return collect((array) $scripts)->map(function ($script) {
            return $this->driver->executeScript($script);
        })->all();
    }
public function script ( $ scripts ) { return collect ( ( array ) $ scripts ) -> map ( function ( $ script ) { return $ this -> driver -> executeScript ( $ script ) ; } ) -> all ( ) ; }
Execute JavaScript within the browser.

@param  string|array $scripts
@return array
Execute JavaScript within the browser .