Give me Example for Generic Functions in QTP
Framework....Anybody please answer me..Thanks in Advance
Answers were Sorted based on User's Feedback
Answer / vijay reddy
In framework we have two types of library functions
2)Project specific functions
Generic functions are generic to any other application
For Example if we create generic functions for one
webapplication , the same generic functions can use for
another applications in automations
|Is This Answer Correct ?||19 Yes||0 No|
Answer / ram
Qtp supports relative path framework.Relative path framework
can help you in creating a generic functions and calling
them through the driver script.
|Is This Answer Correct ?||3 Yes||2 No|
Answer / vijay chourasiya
Generic function means the conman functionality in the application.Example
button, Edit box, Combo box and Radio button,Dropdown,Click on link,Login,Logout,Verifypage.
So if you want to create the generic function/Reusable function in the application only change the object not the logic in the function.
In framework you have Button so you have to create:
sobjname = obutton.tostring
sstepname = "Buttonclick"
bexists = obutton.Exist(0)
If bexists Then
smsg = sobjname&" Exists"
smsg = sobjname&" does not Exists"
bdisabled = obutton.getroproperty("disabled")
If bdisabled = 0 Then
smsg = sobjname&" is enabled"
smsg = sobjname&" is disabled"
smsg = "clicking on "&sobjname
* so here you have to change only (obutton) in the repository or from Util file.
Project specific functions:
Project specific function is related to the only your project prospective.Example:
login page loading so you will not use wait because you don't know the loading time.
so for this you have to create DynamicLoad Function.and this function also resusable
2)Example:The framework contains input from the XML so you have to create project specific function
3) Example: Suppose you want to manipulate the scripts as per the requirement then you have to create Project specific functions and its control by Driver Script.
|Is This Answer Correct ?||1 Yes||0 No|
How many types of OBJECTS are there in QTP?
What are the advantages of parameterization ?
WHAT IS THE DIFF BTW KEYWORD DRIVEN TESTING AND DATA DRIVEN TESTING?
What is dynamic arrays
How can I find out whether a word in a string is existed or not for example "QTP IS A POWERFULL TOOL FOR AUTOMATION" How can i find out whether "powerfull" is existed in the above string or not Could anyone answer it?
In how many ways we can add check points to an application using QTP.
what is ODC and GDC?
Which HTML specification will be adhered to? How strictly? What variations will be allowed for targeted browsers?
What is environment variable in qtp and why to use it?
Types of properties that Quick Test learns while recording?
what do u mean by test harnesses in qtp?
write a script to verify the image path(src property) of the images which are in web pages.