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

what is the abbrivation of .mtr in action reposirtory?

8 Answers   GE,


If some requirements r changed during the testing process ,then how can u handle this in frame work?

1 Answers  


If you are using descriptive programming and you have two objects with the same name, so you are identiying them by name and index, how can you avoid errors if a third object with the same name is added at the begining of the page?

4 Answers  


What are the Test design techniques you uses in ur project?

0 Answers   Accenture,


Hi, Plz give best Definition of Software Testing? Why we need Software Testing? and plz send 2+yrs experience Interview qutions (Manual,Qtp).

10 Answers  






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

1 Answers  


What expansion of "MIC" in MICPASS (TEST ReportPAGE)

11 Answers   TCS,


what are the principles of good testing scripts for automation?

1 Answers  


We are using the QTP version 9.0 where we want to call objects from global repository for a particular function at runtime for increasing the performance of framework.We are actually looking for loading the objects under test (OAT) dynamically when script runs and would like to unload the same once the execution of the script is completed.

2 Answers  


How to enable the text check point in qtp? By default it is disables

1 Answers   Sify, ssinformatics,


i am entering wrong data or wrong password in a text box and click on submit button .i am getting a popup window with a message Please enter the correct password or data .How can i handle this situation by using QTP.

11 Answers   SAP Labs,


Write a function which returns the addition of two numbers. give the value of the numbers outside the function.

3 Answers   SAP Labs,


Categories