Printable Version of Topic

Click here to view this topic in its original format

UtterAccess Forums _ Microsoft Internet Explorer _ Replicate F12 Clear Session Cookies Programatically

Posted by: champagne_charly Mar 5 2014, 07:06 AM

I am automating IE.
The site I am accessing does not have a logout option.
Unfortunately I have 2 accounts to loginto and need to use both in the process (one then other).
Ologin with 1st account. (no problem) process information.
When I have closed the shtm I reopen and try and login with 2nd account details. Unfortunately the site recognises think I am still logged in.
The issue only occurs when another IE window is open. However as this happens behind the scenes in hidden mode and without user intervention I only want IE windows who are related to the site to be closed.
I have tried deleting cookies history etc programmatically but nothing I seem to do works. That is unless I clear session cookies from f12 cookies menu.
How can I replicate this action? Obviously they are not the usual cookies found in AppData\Roaming\Microsoft\Windows\Cookies
Any suggestions would be appreciated.

Posted by: champagne_charly Mar 5 2014, 11:24 AM


Posted by: champagne_charly Mar 5 2014, 12:56 PM

java script:void(document.execCommand('ClearAuthenticationCache'));
How i need someway to trigger this from shdocvw :S

Posted by: champagne_charly Mar 5 2014, 02:57 PM

This takes the idea of talking to myself to whole new level...
olution was staring in my face.

dim htmlDoc as MSHTML.IHtmlDocument
htmlDoc.execCommand ("ClearAuthenticationCache")

If only MS could remain consistent with their naming. authentication cache in JS and MSHTML and session cookies within IE