Hi,
Is there any function or vbscript in QTP to clear the
cookies,sessions. Please help me in this.
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / vikrant
Hi
Just write a user defined function and copy paste the
code and associate it with your script. You can call the
function where ever u want in script
Thanks
Vikrant
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / babu
Hi rayudu,
I executed the script provided by you . it is working fine.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / babu
Hi Latha,
I tried with the script by included in particular actions
where i want.
If i want to use it for each and every execution, i don't
have any idea how to do it. Pls help me out in this.
| Is This Answer Correct ? | 0 Yes | 0 No |
Please explain about unicode compatibility in QTP. how we can able to use it. Please help me
what is the silent mode in WR?
How to change the run-time value of a property for an object?
What is throw object?
difference Between Call Run action and copy of action?
What is the default object synchronization timeout in qtp?
What are the things(properties, and other details) will be recorded while recording an object using normal recording?
What are the features and benefits of Quick Test Pro(QTP)?
What are output values and why they are used ?
when u script reveiwing in which area u more concentrates?
How to Display last item of a Combobox by using QTP?
Why QTP is termed as a Record and Playback tool?