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

Why do you create a text checkpoint on a Web application? What is the purpose of the Close method?

1844


How to call a test from another test?

1371


what QTP Options do you know?

3392


How to save your test using quicktest professional?

1046


I want to read XML file loaded in Quality center and compare the values with the values displayed in Application (web table).How can I do that

1858


how to disable the pop ups through QTP using a script

2271


What is different command used in command Prompt while using QTP?

2234


How to save your test using quicktest professional (qtp)?

1101


hi to all, i need a code.. in flight application 1.i need to login first then i need to insert 3 new orders... 2.i have to log out 3.i have to login again with different user 4.need to insert 2 new orders 5.then need to log out 6.then again login with different user 7.3 new orders create and log out 8.but we hv to do this using data table and actions please help me

2286


How to remove the associated function library?

991


in my application,validation message has in japanise language.how to validate this message is appears properly or not

2047


how we implement share object repository in QTP 9.0 without using quality Centre , Explaine in brief

2133


How can you identify the browser and its information using the qtp script?

995


What is the parameterization?

1032


Hai anyone please "Explain about Framework in QTP?"

2165