开发者

Get cookies in Webdriver how?

开发者 https://www.devze.com 2023-04-09 04:03 出处:网络
There is a method in Webdriver Ruby bindings for getting the cookies: (Array<Hash>) all_cookies with the following description:

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

精彩评论

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