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
Why do you create a text checkpoint on a Web application? What is the purpose of the Close method?
How to call a test from another test?
what QTP Options do you know?
How to save your test using quicktest professional?
I want to read XML file loaded in Quality center and compare the values with the values displayed in Application (web table).How can I do that
how to disable the pop ups through QTP using a script
What is different command used in command Prompt while using QTP?
How to save your test using quicktest professional (qtp)?
hi to all, i need a code.. in flight application 1.i need to login first then i need to insert 3 new orders... 2.i have to log out 3.i have to login again with different user 4.need to insert 2 new orders 5.then need to log out 6.then again login with different user 7.3 new orders create and log out 8.but we hv to do this using data table and actions please help me
How to remove the associated function library?
in my application,validation message has in japanise language.how to validate this message is appears properly or not
how we implement share object repository in QTP 9.0 without using quality Centre , Explaine in brief
How can you identify the browser and its information using the qtp script?
What is the parameterization?
Hai anyone please "Explain about Framework in QTP?"