开发者

How add a cookie to specific domain using selenium

Is there a way to specify the domain in which the cookie is to be set.

I foll开发者_C百科owed this way

selenium.open(example.com); selenium.createCookie(arg1, arg2);

Is there any way by which i can set the cookie in .example.com domain?

Note : If i open example.com it will be redirected to www.example.com


selenium.open(...);
selenium.createCookie("name=value", "domain=.example.com");

http://selenium.googlecode.com/svn/tags/selenium-2.0-rc-2/docs/api/java/com/thoughtworks/selenium/Selenium.html#createCookie%28java.lang.String%2C%20java.lang.String%29

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜