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 |
How QTP support all types of applications (platforms)?
what is web application and client server application.is there any difference ?
how to lunch the application in the qtp tool ?
Which features or drawbacks of QTP lead to the upgrade for a newer version?
Diff b/n image n bitmap checkpoints?
How do you copy a value from a cell in an msexcel sheet saved on the desktop into QTP's datatable when the co-ordinates of cell are given?
how to acess a test in RSA?
How can you identify the browser and its information using QTP script?
i have doubt suppose iam purly working in QTP, when i will work on sql and performence testing? pls any one clarify doubt?
How can we count the no of rows are available in a data table ?
which checkpoint we use to validate yahoo login screen window after login with ur id and password in qtp
What is the difference between run time object and test object in QTP?