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



Hi, Is there any function or vbscript in QTP to clear the cookies,sessions. Please help me in this..

Answer / rayudu

webutil.DeleteCookies

Is This Answer Correct ?    9 Yes 1 No

Hi, Is there any function or vbscript in QTP to clear the cookies,sessions. Please help me in this..

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

Hi, Is there any function or vbscript in QTP to clear the cookies,sessions. Please help me in this..

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

Hi, Is there any function or vbscript in QTP to clear the cookies,sessions. Please help me in this..

Answer / babu

Hi rayudu,

I executed the script provided by you . it is working fine.

Is This Answer Correct ?    0 Yes 0 No

Hi, Is there any function or vbscript in QTP to clear the cookies,sessions. Please help me in this..

Answer / latha

where can i inculde the above script?Do i need to call this
for each and every time when the QTP opens new window?

Is This Answer Correct ?    0 Yes 0 No

Hi, Is there any function or vbscript in QTP to clear the cookies,sessions. Please help me in this..

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

Post New Answer

More QTP Interview Questions

I want to do Certification course in QTP. For this I request you to suggest the best Tutorial in PDF format, and also tell me the best institute and the estimate cost for joining the institute ib delhi NCR. Hence, if possible, kinldy mail PDF file to my mail-ID: kumar123.pathak@gmail.com , Regards, kumar pathak

0 Answers  


Hi Friends, How many types of Data Bases available in market... What is the diff. while using Syabase and Oracle in a Project... ? and what is the main diff. of Syabase and Oracle databases... ? Thanx in advance..

0 Answers  


wht is Manual Testing Frame work. Pls anybody can give appropriate answers

0 Answers   Satyam,


Anybody wants to learn QTP with realtime implementations and complete framework desiging plz contact to this mail id ciraaj@gmail.com

1 Answers  


What is Port testing. Whhen will you perform?

0 Answers  


Tell me the situations where we will use Data Driven?

4 Answers   Ordain Solutions,


What does VBS file contain...??? what is VBS file.. ???

6 Answers   GE,


Limitations in QTP?

0 Answers   CIL,


There is a very good institute for Automation Testing using QTP.For more details please visit jbslearnings.com.

1 Answers  


How many ways we can parameterize data in quicktest professional (qtp)?

0 Answers  


what is the frame work your using in automation ?

4 Answers  


I want to execute 1st row of the local sheet and 3rd row of the global sheet parellely. write script to execute

2 Answers   IBM,


Categories