1

I need to set a cookie in IE to execute some specific flow. I tried using the following code

ieb = Watir::IE.new

ieb.document.cookie="rememberme=foobar;Path=/; Domain=sometestdomain.com"

# Bring up browser and do bunch of stuff

However, I see that when the IE comes up, rememberme cookie is not set. Am I doing something wrong here?

4

1 回答 1

1

您需要首先打开浏览器并从 sometestdomain.com 加载一些文档。然后你就可以设置cookies了。

于 2011-01-05T11:53:43.820 回答