Cookie getCookie(String url, String name) {
        List<Cookie> cookies;
        try {
            cookies = getCookies(getDomainsFromUrl(new URL(url)).get(0));
        } catch (MalformedURLException e) {
            throw new SelendroidException("Error while adding cookie. " + e);
        }
        // No cookies for given domain
        if (cookies == null || cookies.size() == 0) {
            return null;
        }
        for (Cookie cookie : cookies)
            if (cookie.getName().equals(name)) {
                return cookie;
            }
        return null; // No cookie with given name
    }
Gets a cookie with specific name for a URL.

@param url
@param name Cookie name to search
@return Cookie object (if found) or null
selendroid-server/src/main/java/io/selendroid/server/model/SessionCookieManager.java