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
Suppose I want fail that check point? How can you do that?
what type of values given to objects. EX::Set oBrowser=Description.Create oBrowser(“micclass”).Value=”Browser”
What is quick test pro? What is a quick test professional?
How do you do batch testing in wr and is it possible to do in qtp, if so explain?
wt is the use of multiple questions in QTP
How can you exit from an action?
How to define array in qtp?
What is the qtp testing process?
An action has both shared and local or associated to it and both have the same object in them. In the test which one will be considered?
Can you write a script to check if the folder exists or not?
What is difference between design time and run time data table?
I want two test two agents login for the flight website. Here is the scenario: I want to go through 1-3 rows for one user login and other user login I want to go though 3-5 rows. How would you set this up in qtp. Thank You
How many types of object repository in qtp?
Does quicktest professional (qtp) is unicode compatible?
what is run action?