Page 1 of 1

How to delete browser cookies (Internet Explorer)

Posted: Mon Jan 09, 2012 2:56 pm
by akommalapati
Hi,
Can u please let me know the code for deleting cookies.

Thanks
Ajay

Re: How to delete browser cookies (Internet Explorer)

Posted: Mon Jan 09, 2012 5:18 pm
by Support Team
Hi,

Please take a look to following post
http://stackoverflow.com/questions/1611 ... ete-cookie

I've used Google to find this link.

Regards,
Peter
Ranorex Team

Re: How to delete browser cookies (Internet Explorer)

Posted: Wed Sep 18, 2013 5:56 pm
by timhunt
Good grief! Don't you have a better answer than that? I have to manually implement a different hack to clear cookies in each browser. Wound't a standard clear cookies action provided by you be better?

(Well, obviously it would. I guess what you are saying is that it does not exist.)

Re: How to delete browser cookies (Internet Explorer)

Posted: Mon Sep 23, 2013 8:28 pm
by Alena
Hi,

is it possible now to implement a new action/function for clearing cache/cookies so that I can do it by a single line of code for each of 4 browsers instead of creating 4 pages of code?

I'm sure most of Rx users test web-sites and have to use this functionality pretty often.

Thanks,
Alena.

Re: How to delete browser cookies (Internet Explorer)

Posted: Tue Sep 24, 2013 2:07 pm
by krstcs
Each browser stores and manipulates cookies differently. Some (Safari, Chrome) DO NOT ALLOW Ranorex to manipulate certain areas of the browser, so it would be almost impossible for Ranorex to find a uniform, consistent way to do it.

You could implement your own lower-level clean-up routine by just deleting the cookies from the OS, since you should know where they are depending on your installation. Since Ranorex is all .NET, it's not hard to do. Then just call that routine when you run the tests that need cookies cleaned up.

And doing that is NOT a hack, it's what we, as test automation developers, are supposed to be doing, using the great tools that Ranorex and .NET provide...