Hi,
Is there any function or vbscript in QTP to clear the
cookies,sessions. Please help me in this.
Answer Posted / jay prakash
You can write your own function also:
Public Sub MyDelCookies()
'Option Explicit
Dim strPath, WshNetwork, fso, objFol, objFile, var
strPath="c:\Documents and Settings\"
Set WshNetwork = CreateObject("WScript.network")
strPath=strPath + WshNetwork.UserName +"\Cookies"
Set fso = CreateObject("Scripting.FileSystemObject")
Set objFol = fso.GetFolder(strPath)
Set objFile = objFol.files
For Each var in objFile
If var.name<>"index.dat" Then
var.delete
End If
Next
Set WshNetwork=Nothing
Set fso=Nothing
End Sub
Please let me know if it helps.
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
Can any body please tell me the steps of keyword driven framework of QTP.
explain structured testing? plz guys with exp. do answer
Explain how you can replace string in qtp?
How to do the scripting. Are there any inbuilt functions in QTP? What is the difference between them? How to handle script issues?
What is a programmatic description?
How do you convert manual test cases to automated test cases?
What is the default object synchronization timeout in qtp?
your coming from electrical backgroung..but y ur coming to software side?
Create flight reservation login descriptive programing (Condition: Remove the value and substitute with a variable, and then call the validation from Excel) Plz help me....... very urgent.........
how do u manipulating INI, DLL and / or registry files in support of your test environment? actually what do u mean by INI and DLL or registry files. plzzz its urgent do answer
Describe function procedure in vbscript.
How to use actions in qtp ?
How is UFT 11.5 version different from UFT 12.0?
How to do the scripting. Is there any inbuilt functions in qtp as in qtp-s.
Explain features of the latest version of qtp/ uft 12.1?