Skip Menu |

This queue is for tickets about the Test-WWW-Selenium CPAN distribution.

Report information
The Basics
Id: 48999
Status: resolved
Priority: 0/
Queue: Test-WWW-Selenium

People
Owner: Nobody in particular
Requestors: omehegan [...] sixapart.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.17
Fixed in: (no value)



Subject: No way to delete cookies outside the current domain
It looks like the delete_cookie() method in WWW::Selenium cannot handle deleting cookies with domains other than the current base domain being tested. I'm testing an application which can link with Facebook through their API, and in doing so Facebook creates a cookie named 'xs' with 'path=/' and 'domain=.facebook.com' but if I call $sel->delete_cookie("xs", "/") the cookie in question does not get deleted. According to the docs: $sel->delete_cookie($name, $path) Delete a named cookie with specified path. $name is the name of the cookie to be deleted $path is the path property of the cookie to be deleted Am I out of luck on this? It appears that Selenium Core has a deleteCookie function: 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. I guess, given the note about domains, maybe the issue lies elsewhere anyway. My environment: Perl v5.8.8 on MacOS X 10.5.
Subject: Re: [rt.cpan.org #48999] No way to delete cookies outside the current domain
Date: Tue, 25 Aug 2009 13:42:54 -0700
To: bug-Test-WWW-Selenium [...] rt.cpan.org
From: Luke Closs <lukecloss [...] gmail.com>
WWW::Selenium just passes the commands through to the selenium core, so I suspect the problem if any lies with selenium core. Perhaps you could also use the get_eval() method to run javascript to do what you need. Cheers, Luke On Tue, Aug 25, 2009 at 1:32 PM, Owen B. Mehegan via RT<bug-Test-WWW-Selenium@rt.cpan.org> wrote: Show quoted text
> Tue Aug 25 16:32:36 2009: Request 48999 was acted upon. > Transaction: Ticket created by omehegan >       Queue: Test-WWW-Selenium >     Subject: No way to delete cookies outside the current domain >   Broken in: 1.17 >    Severity: Important >       Owner: Nobody >  Requestors: omehegan@sixapart.com >      Status: new >  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=48999 > > > > It looks like the delete_cookie() method in WWW::Selenium cannot handle > deleting cookies with domains other than the current base domain being > tested. I'm testing an application which can link with Facebook through > their API, and in doing so Facebook creates a cookie named 'xs' with > 'path=/' and 'domain=.facebook.com' but if I call > $sel->delete_cookie("xs", "/") the cookie in question does not get > deleted. According to the docs: > > $sel->delete_cookie($name, $path) > >    Delete a named cookie with specified path. >        $name is the name of the cookie to be deleted >        $path is the path property of the cookie to be deleted > > Am I out of luck on this? It appears that Selenium Core has a > deleteCookie function: > > 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. > > I guess, given the note about domains, maybe the issue lies elsewhere > anyway. > > My environment: > > Perl v5.8.8 on MacOS X 10.5. >
This is out of the scope of Test::WWW::Selenium. The problem is a limitation of Selenium-RC