how to create user defined functions in QTP? can any one
expalin me with example..
Thanks in Advance for help
Answer Posted / manjunathareddy
User Defined functions nothing but A function which is not
related to project.
(Note :- Bulit in functions are Function which are Available
in QTP Library EX:- Len,StrComp etc,etc)
Example :- i will take zip folder function expample as user
defined function.
Function Zipfolder(oSource,oDestination)
On Error Resume Next
Err.CLear
Set Fso=CreateObject("Scripting.FileSystemObject")
Set oFile=Fso.OpenTextFile(oDestination,2,True)
oFile.Write "PK" &Chr(5)&Chr(6)&string(18,Chr(0))
oFile.Close
Set oShell=CreateObject("Shell.Application")
oShell.NameSpace(oDestination).CopyHere
oShell.NameSpace(oSource).Items
Do until
oShell.NameSpace(oDestination).Items.Count=oShell.NameSpace(oSource).Items.Count
WScript.Sleep 100
Loop
End Function
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
could any help me please, how to work on visual foxpro application using UFT
hi all can anyone explain how to write the code for finding the mandatory columns in table which are having (red*) (red Astrik)
i have doubt suppose iam purly working in QTP, when i will work on sql and performence testing? pls any one clarify doubt?
I hav installed QTP8.2, im working on webapplication, while running the script giving error msg like "QTPro.exe generated errors and will be closed by windows. You will restart the program. An error log is being created". Pls anybody what is the problem, what i have to do for this? Thanks...
Does any one worked on JIL Emulator , Testing with QTP(automation). Trail Version of QTP is not identifying the child objects of JIL emulator, Can any one help me out ,
Hi all can any one give me roles and responsibilities for QTP (not WINRUNNER)
I would like to directly import XL file and work on that XL file directly in QTp script in that XL sheet need to allocate workbench,XL sheet and generate two bar graphs automatically how to do that? plz let me know any answers?
What are the various types of Actions in UFT?
hi frinds i need help .i have 4 + yrs exp in testing and nearly 2 yrs exp in QTP and QC .currently iam working north fast 2 yrs iam looking for job in south is there any openings plz letme know my mail id is pbre1980@gmail.com
What is a Patch in QTP?
Write the code for,In the page screen we have total 10 Links,out of these I have to click 9th link
Hi frnds, does anybody know if there is anything called "thin point" or something in qtp? thanks in advance.
Can we create a qtp test from qc?
how to test use the quality control .how to verify the image verification
What is QTP testing process?