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
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 |
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 |
Answer / babu
Hi rayudu,
I executed the script provided by you . it is working fine.
Is This Answer Correct ? | 0 Yes | 0 No |
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 |
what is the abbrivation of .mtr in action reposirtory?
If some requirements r changed during the testing process ,then how can u handle this in frame work?
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?
What are the Test design techniques you uses in ur project?
Hi, Plz give best Definition of Software Testing? Why we need Software Testing? and plz send 2+yrs experience Interview qutions (Manual,Qtp).
Anybody wants to learn QTP with realtime implementations and complete framework desiging plz contact to this mail id ciraaj@gmail.com
What expansion of "MIC" in MICPASS (TEST ReportPAGE)
what are the principles of good testing scripts for automation?
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.
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.
Write a function which returns the addition of two numbers. give the value of the numbers outside the function.