2 Replies Last post: Sep 5, 2008 8:16 PM by Sujit  
Sujit Beginner 26 posts since
Oct 9, 2007
Currently Being Moderated

Sep 4, 2008 10:09 PM

delete cookie not working

I'm trying to delete the following cookie "at-main" which is a secure cookie. I used the view cookie plugin to see its path however the cookie still doesn't get deleted

selenium.deleteCookie("at-main","/');

However when i check the cookie it is still present

gim_h Almighty 564 posts since
Oct 17, 2007
Currently Being Moderated
1. Sep 5, 2008 8:24 AM in response to: Sujit
Re: delete cookie not working

that because you command is not right, take a look at the comment of this command from selenium ide


deleteCookie(name, optionsString)
    Arguments:

        * name - the name of the cookie to be deleted
        * optionsString - options for the cookie. Currently supported options include 'path', 'domain' and 'recurse.' 
    The optionsString's format is "path=/path/, domain=.foo.com, recurse=true". The order of options are irrelevant. 
    Note that specifying a domain that isn't a subset of the current domain will usually fail.

    Delete a named cookie with specified path and domain. Be careful; to delete a cookie, 
    you need to delete it using the exact same path and domain that were used to create the cookie. 
    If the path is wrong, or the domain is wrong, the cookie simply won't be deleted. 
    Also note that specifying a domain that isn't a subset of the current domain will usually fail. 
    Since there's no way to discover at runtime the original path and domain of a given cookie, 
    we've added an option called 'recurse' to try all sub-domains of the current domain with all paths that are a subset of the current path. 
    Beware; this option can be slow. In big-O notation, it operates in O(n*m) time, 
    where n is the number of dots in the domain name and m is the number of slashes in the path.

 

More Like This

  • Retrieving data ...