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 |
what is flag=0 in qtp tool.. i am strugglin to use flag function , exactly when it is used , any real time expert pls explain clearly?
Hi What are re-usable actions in QTP? -Thank You
How to give Table check points?
what is keyword driven testing in qtp?n how is it useful?
What is checkpoints for qtp?
1) after inserting the check point how to change the expected value that was captured while inserting the check point
Hi all , I am new at QTP I want a sample script to check validation messages(For java script or VB script) for login page with for web based application.. Any one can Help. I have to complete it in two days I need urgent help.. Ex. if I want to check mail.yahoo.com 1 > If user doed not exist it display "Username does not exist" 2> if invalid Uname and password then it display" Invalid Uname or pass" 3> Loing Sucssessfully. I want to check this types of application by using data table to give values of username and password.. Thanks
why we are using environment variables instead of global variables?
what is the difference between image and bitmap check point
can i able to connect any version of qtp to any version qc
why should we give deliver good quality software?
Have you faced any problems with object repository?