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 does QTP identifies the object in the application?
Why we are selecting QTP for testing ?
write a script to verify links on any web page by using descriptive method by creating a description object (give a filter condition only link) ... need to verify expected like name by reading
What is method name to compare two XML files.
In my script there is a link(e.g. 'My Page') when I execute the script sometimes(not every time) QTP throws an error that "My Page(as link)" not found. Pleaase tell me where I need to update
How can I pass values from one action to another in QTP ?
How do you check ticket cost and ticket number in flight application?
hi everyone today is the first time i saw this website,and hi iam siraj,iam very impressed by seeing evryones response towards questions,iam a newcomer and i have got tryining in testing can anyone please send me some projects relaited to testing.i know it is very confidential but still if u send it will a great help. my mail id venku_krs@yahoo.co.in
I want to assign values in a table in my software, in first column i will give values, table is of 4x4 i.e 4 row and 4 columns, i m using VBScript in my automation work. it is a simple table for giving values.
When u r running a script , if u get a popup window that describing that u have received a mail to your outlook application. so to avoid the interference of the popup window , which recovery scenario(popup,object state,application hang,system crash) would u use ?
What is AUT in object reposity in QTP? Why we use it in Object repository???What is full form???????
what is input pramater out output pramater ?i want the decrepation..?how to use in QTP?
3 Answers Infinite Computer Solutions,