Click here to Skip to main content
15,122,406 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
guys im trying to download cookies from my browser to a certain path. I don't know if im doing it right or wrong. so please correct me, i've searched on google and didn't find any direct answer.

What I have tried:

<pre><pre lang="c#"> var session = selenium1.driver().Manage().Cookies.AllCookies.ToArray();
                    TextWriter sw = new StreamWriter("channels/test/" + textBox1.Text+"/"+"");
                    foreach (Cookie cookie in session)
                        MessageBox.Show(cookie.Name + ":" +cookie.Value +":"+ cookie.Domain+ ":" + cookie.Path + ":" + cookie.Expiry + ":" + cookie.Secure);

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900