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

Can any body please tell me the steps of keyword driven framework of QTP.

1935


explain structured testing? plz guys with exp. do answer

1844


Explain how you can replace string in qtp?

1039


How to do the scripting. Are there any inbuilt functions in QTP? What is the difference between them? How to handle script issues?

1101


What is a programmatic description?

1074


How do you convert manual test cases to automated test cases?

1067


What is the default object synchronization timeout in qtp?

1188


your coming from electrical backgroung..but y ur coming to software side?

1760


Create flight reservation login descriptive programing (Condition: Remove the value and substitute with a variable, and then call the validation from Excel) Plz help me....... very urgent.........

2160


how do u manipulating INI, DLL and / or registry files in support of your test environment? actually what do u mean by INI and DLL or registry files. plzzz its urgent do answer

1970


Describe function procedure in vbscript.

1086


How to use actions in qtp ?

1020


How is UFT 11.5 version different from UFT 12.0?

1024


How to do the scripting. Is there any inbuilt functions in qtp as in qtp-s.

956


Explain features of the latest version of qtp/ uft 12.1?

1023