public function getCookie($name) {
    $cookies = $this->browser->cookies();
    foreach ($cookies as $cookie) {
      if ($cookie instanceof Cookie && strcmp($cookie->getName(), $name) === 0) {
        return $cookie->getValue();
      }
    }
    return null;
  }
public function getCookie($name) {
    $cookies = $this->browser->cookies();
    foreach ($cookies as $cookie) {
      if ($cookie instanceof Cookie && strcmp($cookie->getName(), $name) === 0) {
        return $cookie->getValue();
      }
    }
    return null;
  }
public function getCookie ( $ name ) { $ cookies = $ this -> browser -> cookies ( ) ; foreach ( $ cookies as $ cookie ) { if ( $ cookie instanceof Cookie && strcmp ( $ cookie -> getName ( ) , $ name ) === 0 ) { return $ cookie -> getValue ( ) ; } } return null ; }
Gets a cookie by its name if exists, else it will return null
@param string $name
@return string
Gets a cookie by its name if exists else it will return null