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
What are the differences between quicktest professional (qtp) and winrunner?
Explain the terms test and business component?
How to data driven test for Win objects in QTP ?
Can we use index on view?
In QTP can we feed the out of one browser(internet explorer) as an input to the another browser(mozilla firefox)? If yes explain how to do it with an example.
In Test Directory, What are the contents in test case designing? if you prepare in excel sheet how u use thrw Test Directory?
Explain step generator in qtp?
What is business process testing(bpt) in qtp?
While spliting an action in QTP 10.0 getting an error : "This Line is a part of Script Block.You cannot split the action on this line." how to re-solve this and split the script into actions?
This is a question thats generally asked in every QTP interview. What were the problems that you faced during automation and how did you resolve them?
To which environments does quicktest professional supports?
Output values? i want a practical example
What is difference in global and action sheet in qtp?
What are the types of object repositories? Which one is you using?
In QTP TEST DIRECTOR COMBINATION WHAT IS THE PURPOSE OF TEST DIRECTOR? In Somebody says to store test cases and design test cases.?ok fine , but In test director 5.0 , QTp not launching. what u do?