使用VBScript清除缓存和cookie

时间:2017-05-23 04:20:25

标签: cookies vbscript hp-uft

以下是我想用来清除浏览器历史记录和缓存的代码。它有效吗?

'Clear Browser Cache
webutil.DeleteCookies
intWaited = 0
WshShell.Run "Rundll32.exe InetCpl.cpl, ClearMyTracksByProcess 255", 1, True  'Delete All
While Dialog("title:=Delete Browsing History").Exist(1) And intWaited < 10
    wait(1)
    intWaited = intWaited + 1
Wend
intWaited = 0
SystemUtil.Run "RunDll32.exe", "InetCpl.cpl,ClearMyTracksByProcess 4351"
While Dialog("title:=Delete Browsing History").Exist(1) And intWaited < 10
    wait(1)
    intWaited = intWaited + 1
Wend

1 个答案:

答案 0 :(得分:0)