On Mon, Jan 3, 2011 at 6:58 PM, Jari Bakken <[email protected]> wrote:
> A constraint in WebDriver is that cookie manipulation only affects the > current domain - if Cookies#add is called with another domain, it will > raise an InvalidCookieDomain error. Likewise, Cookies#clear will only > clear cookies for the current domain. I'm not entirely sure what the > reason for this is (I'm suspecting IE), perhaps Simon can shed some > light. If we want cross-browser compatible, we may need to > (artificially) impose this constraint , even for implementations that > can support cross-domain cookie manipulation. The constraint is laid down because we sometimes need to implement the cookie code in pure JS. At that point, the only cookies available are those that are visible in the current domain. The WebDriver API mirrors this constraint. It does mean that in those browsers where we have better integration with the browser the API is more constrained than it needs to be, but it also means that we have a consistent contract between browsers. FWIW, I believe that the SafariWatir is probably the most limited watir implementation when dealing with cookies because of its use of JS, so I'd be looking to use that as the "lowest common denominator". Also, no-one's really got a good way of acknowledging HTTP only cookies. Simon _______________________________________________ Wtr-development mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-development
