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 views available in qtp?
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?
Problem with XML checkpoint in QTP ?
write a script to verify the image path(src property) of the images which are in web pages.
Can UFT be connected to Quality Center? If ‘Yes’ brief the process or steps.
What is optional step in qtp? How you can add optional step in qtp?
Without integrating QC/Testdirector with QTP, is it possible to keep track of the defects?If yes how? How to export QTP results to an excel sheet?
Write a script to customize the test results in PDF and HTML format.
What is a checkpoint? How many check points are there in qtp?
How does qtp identify objects in the application?
What is the descriptive programming?
hi all here i have tab named "Workbench" By clicking on "workbench" tab.it displays 4 tabs like below workbench common cargo commercial charter "common" tab have 10tabs inside,"cargo" tab also haveing 15 tabs inside and remaining two tabs also having few tabs inside. when clicked on "common" tab.it displaying the script like tab("workbench").select"common" if i clicked on "cargo".it displaying the script like tab"workbench_2").select"cargo" if i clicked on "commercial".it displaying the script like tab"workbench_3").select"commercial" if i clicked on "charter".it displaying the script like tab"workbench_4").select"charter" I have used a "FOR LOOP" for common,commercial,cargo,charter tabs.it was stopped at second tab SO, CAN I RECOGNIZE "WORKBENCH_2,_3,_4" AS A SINGLE VARIABLE if not, can anyone plese help me to solve this
How to use setroproperty?
how can i call function (which has link with excell sheet at a remote location) within another function
How you are developing the script? Using record and play back or manual?