qtp 删除删除cookies

没有一个现成的方法来删除cookies, 所以你需要写一个Shell Script去删除你的Cookie所在目录的所有文件。实现的代码如下:
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)

你可能感兴趣的:(Cookies)