Yulia
Yulia

Reputation: 1585

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:

* (Array<Hash>) — list of cookies

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

Upvotes: 1

Views: 9438

Answers (2)

Vishnu
Vishnu

Reputation: 319

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

Upvotes: 1

jarib
jarib

Reputation: 6058

Try this:

driver.manage.all_cookies

Upvotes: 9

Related Questions