env-js icon indicating copy to clipboard operation
env-js copied to clipboard

External inspection of cookies.

Open fd opened this issue 15 years ago • 3 comments

Is there a way to inspect the cookies set by the application? Something like browser.cookies[name] would be nice.

fd avatar Apr 11 '11 13:04 fd

There's a cookie interface for the DOM, isn't there? Document.cookie? I'm not sure if it's implemented. Happy to accept a patch ...

smparkes avatar Apr 11 '11 16:04 smparkes

Document.cookie doesn't appear to work. When I load a page (with capybara-envjs) and run evaluate_script('window.document.cookie') on the driver I always get an empty String.

I've been looking around the code for a while and figured out that cookies are handled in cookie.js and I think's got something to do with the domain (document.domain ??) not being set.

fd avatar Apr 11 '11 17:04 fd

Really not sure and, at this point, my time on env-js is very limited so I don't really have a lot of guidance. Patches always welcome, but otherwise ...

smparkes avatar Apr 13 '11 20:04 smparkes