Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are the views available in qtp?

989


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?

1874


Problem with XML checkpoint in QTP ?

3878


write a script to verify the image path(src property) of the images which are in web pages.

2193


Can UFT be connected to Quality Center? If ‘Yes’ brief the process or steps.

1064


What is optional step in qtp? How you can add optional step in qtp?

919


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?

1893


Write a script to customize the test results in PDF and HTML format.

2510


What is a checkpoint? How many check points are there in qtp?

941


How does qtp identify objects in the application?

1085


What is the descriptive programming?

1966


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

1949


How to use setroproperty?

967


how can i call function (which has link with excell sheet at a remote location) within another function

1984


How you are developing the script? Using record and play back or manual?

1010