examples of user definied functions? how to write user
defined functions in qtp9.2?
Answer Posted / nanda
see..u can write user defined function in many ways.
here i am explaing u one sample example.
Public Function Func_Login(strUser,strPassWord)
Browser().Page().WebEdit("Name:=UserID").set strUser
Browser().Page().WebEdit("Name:=Password").setSecure
crypt.encrypt(strPassword)
Browser().Page().WebButton("Name:=Log In").Click
End Function
When ever u want to login to application u can call this
function with parameter values for User and Password.
Example:
sUser = DataTable.Value("UserName")
sPassword = DataTable.value("Password")
' Call the Login function for loggin in to application..
Func_Login sUser,sPassword
Note : the function can not contain Object repository. So
before calling or executing this function u have to
associate Object repostiroy to the Current Action where
this function is called. And also should assoicate the
function library file where this function is stored.
If any queries..
nanda.dreddy@gmail.com
Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
how to test Web application using QTP software
How to run an integrated test scenario using Multiple Actions? How to use the QTP Step Generator?
How to create a standard checkpoint ?
What is data driver in qtp?
What is quick test pro? What is a quick test professional?
What is the use of Debug Viewer?
Is there any pdf or online book for QTP Scripting? Let me know more about QTP Scripting.
Whether qtp 9.0 supports Test director8.0
Explain advantages and disadvantages of ddf?
can the activities of test case design be automated?
What is the basic concept of quicktest professional?
Dear All, How to generate Pass or Fail Report in QTP without using Reporter.Report Event Method ? Thanks Balaji
What are parameterizing tests?
I am getting the "test object property" Description properties "toolkit class" value By using "gettoproperty" in run time But my problem is how to get Ordinal Identyfier's type and value Type is index, value is 0 How can i keep this values in to required place How can i get these values in runtime I have to insert these "index" and "value" into another area Is there any script for this like "gettoproperties","Getroproperties" If anybody knows,please help me .
If object is not recognized by qtp but the object is standard object what is your approach?