|
Rank: Advanced Member Groups: Member
Joined: 2/26/2015 Posts: 53
|
Can you tell me/give me an example of how to retrieve the webviews current cookies? I see that there is a CookiesCollection, but am not sure how to use it with my current webview session.
Thanks,
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,273
|
Hi, EO.WebBrowser does not provide any direct way to get cookies. The easiest way to get the current document cookies is use JavaScript document.cookies. The code would be like this:
Code: C#
webView1.EvalScript("document.cookies");
This will return a string that contains all cookies for the current document. Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 2/26/2015 Posts: 53
|
Thanks got it.
Just to clarify, its "document.cookie" I tried it with document.cookies and was getting null
Thanks.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,273
|
Hi, Thanks for the correction. You can try to run the same code in Chrome browser and see if you get null. If you get the correct value in Chrome browser but not in EO.WebBrowser, then please try to isolate the problem into a test project and send the test project to us. Once we have that we will investigate further. See here for more information on submitting test project: http://www.essentialobjects.com/forum/test_project.aspxThanks!
|
|