Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is expert view and keyword view?

1059


How to import a test case present in ".xls" file to TD under a Test set?

1178


I have some real time based question.. 1.what are the challenges you have faced in your current project. 2.what are the bugs you found in your current project. 3.what are the strategies you follow to convert manual test cases into automation test cases. 4.how QTP identify two different browsers. 5. When you create a function library and share object repository what are the problems you have faced 6. How to solve the tool tip problem 7.what are the interesting bug you have found in your current project. 8.what is your daily work as a automation test engg. 9. how to create a weekly status report. 10. how many test cases you write,review and execute per day. 11.what are the uses of SQL in automation. 12.How to retrieve the data in html through vb script. 13.If application is very slow how to test the application in qtp.

4019


what type of automation is follwed in the project?

1879


If I change the object name in one action will it be updated in all the actions? Or not?

1011


how to evalute defects in QTP script?

1937


When do go for loop condition in test?

1039


Describe how Smart Identification is used

2176


For QTP Test Engineer, What is his contribution to the Project? Means, As as automation test engineer what is his role in the current project?

2211


What is qtpro? What is quick test pro?

999


What is reusable action?

1033


hi all can any body explain how to write the script for finding the mandatory fields which are having [red Astrik sign (*)]

1915


What is the basic concept of quicktest professional?

982


write a script to validate the content in the web application. (do it by OR method) and (do it by Descriptive method by creating a description object..

2254


What is the difference between run time object and test object in QTP?

996