Custom Search

Sunday, January 1, 2012

How to Delete Cookies, Delete Browser temporary files, Clear Browser History with QTP Script

'WebUtil object is one of the undocumented object in QTP.
'Execute the Below statement before opening the browser to delete cookies.

Webutil.DeleteCookies

'To clear temporary Internet files
Set WshShell = CreateObject("WScript.Shell")
WshShell.run "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8"

'To Clear Browsing History
WshShell.run "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1"

wait (10)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.