Micro Focus QTP (UFT) Forums
How to Delete cookies while running the test. script - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: How to Delete cookies while running the test. script (/Thread-How-to-Delete-cookies-while-running-the-test-script)



How to Delete cookies while running the test. script - chetan-24 - 11-19-2008

Hello All,

I have such an interesting issue with my web application.
my application required deleting cookies after each and every action iteration.
i was afraid that how it could be possible?
could you please help me how it's possible ?
its an urgent.

Thanks
Chetan


RE: How to Delete cookies while running the test. script - manojmathew1984 - 11-27-2008

include the below code


Code:
Const COOKIES = &H21&

Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(COOKIES)
Set objFolderItem = objFolder.Self
strPath = objFolderItem.Path & "\*.*"
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFile(strPath)



RE: How to Delete cookies while running the test. script - chetan-24 - 11-28-2008

Thanks manoj let me check this code.