|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.