Delete Flash Cookies via Code

855 Views Asked by At

Using C# (or VB if needed), I am setting up a simple automated browser program. Right now I am doing this via watin. I am doing this on my Windows 7 Desktop and the browser I am automating via Watin is IE. Ideally I would like to keep it as is, in C# using watin, but I am flexible.

Each time I run the program I would like to delete the cookies, which with watin is simple to execute. The problem I have is deleting the flash cookies.

I know to manually delete the cookies you can do it here, but I'd like to figure out a way to do it via programming FLASH COOKIES SETTINGS

Also, here is a Great paper on Flash Cookies and Privacy

Please let me know if I left anything out, or what I can do to make this question as clear as possible.

2

There are 2 best solutions below

1
On

Take a look at this blog post for a simple batch file that does this: http://www.ardamis.com/2010/07/07/how-to-delete-flash-cookies/ . This can easily be converted to C# or (you can shell out to the batch file) and executed from your test suite init.

0
On

Use SOLReader to delete the relevant LSO data.