Get cookies in Webdriver how?

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

(Array<Hash>) all_cookies

      

with the following description:

Return:

* (Array<Hash>) — list of cookies

      

Could you please give an example of its use. Thank!

+1


source to share


2 answers


Try the following:



driver.manage.all_cookies

      

+8


source


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



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

+1


source







All Articles