Reputation: 361
I recently used the Mozmill addon/tool do some UI automation. This has worked really well so far, except when I'm trying to set and then read some cookies. When I use Mozmill to set cookies, I don't seem to get the traditional javascript cookie behavior, i.e. I can set document.cookie as often as I want, but I always get the last value set when I read from the cookie object. Here is an example:
controller.window.document.cookie = "foo=bar";
controller.window.document.cookie = "me=too";
controller.window.alert("Cookie: " + controller.window.document.cookie); //"Cookie: me=too"
Perhaps I don't understand how cookies work in javascript or perhaps they don't work the way I assume inside Mozmill. Mozmill documentation and google searches didn't yield any good answers. Thanks in advance for any help.
Upvotes: 0
Views: 175