开发者

Get cookies in Webdriver how?

There is a method in Webdriver Ruby bindings for getting the cookies:

(Array<Hash>) all_cookies

with the following description:

Returns:

开发者_如何学JAVA
* (Array<Hash>) — list of cookies

Could you please, provide an example of its usage. Thanks!


Try this:

driver.manage.all_cookies


Here is nice blog on webdirver and cookies: http://element34.ca/blog/webdriver-and-cookies

In case you are looking for solution to read cookies from multiple domains: http://automationoverflow.blogspot.in/2013/07/getting-cookies-from-all-domains.html

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜