开发者

Mozmill UI automation and cookies

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.windo开发者_如何转开发w.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.


I would try looking at Selenium.

Its designed for cross browser UI testing and is a more mature project. Mozmill is currently being used to make sure that firefox itself (and other applications based on mozilla) are working properly.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜