void remove(String url, String name) {
        List<String> domains;
        try {
            domains = getDomainsFromUrl(new URL(url));
        } catch (MalformedURLException e) {
            throw new SelendroidException("Error while adding cookie. " + e);
        }
        for (String domain : domains) {
            List<Cookie> cookies = getCookies(domain);
            for (Cookie c : cookies) {
                if (c.getName().equals(name)) {
                    cookies.remove(c);
                    // To remove a cookie we set the date somewhere in the past.
                    cookieManager.setCookie(domain, String.format("%s=; expires=%s", name,
                            new SimpleDateFormat(COOKIE_DATE_FORMAT).format(System.currentTimeMillis() - 500)));
                    break;
                }
            }
        }
        cookieManager.removeExpiredCookie();
    }
Removes cookie by name for a URL.

@param url to remove cookie for
@param name of the cookie to remove
selendroid-server/src/main/java/io/selendroid/server/model/SessionCookieManager.java