examples of user definied functions? how to write user
defined functions in qtp9.2?

Answers were Sorted based on User's Feedback



examples of user definied functions? how to write user defined functions in qtp9.2?..

Answer / viswanath

Its better to write user defined functions by using
Descriptive programing in notepad and save them as .vbs
extension. we can upload those files in QTP and we can use
those functions.

Is This Answer Correct ?    3 Yes 0 No

examples of user definied functions? how to write user defined functions in qtp9.2?..

Answer / 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

examples of user definied functions? how to write user defined functions in qtp9.2?..

Answer / sonu

using function definition generator,we can also write functions.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More QTP Interview Questions

how to load the *.vbs (or) test generating script in a new machine?

3 Answers   Ordain Solutions,


Why is action split used by qtp?

0 Answers  


Please Explain The QTP real Testing process with steps.

4 Answers  


What is Descriptive Programing? In which cases, we will go for descriptive programing?

2 Answers   CTS,


Connect to QC using AOM.

0 Answers   Deloitte,


what are inputs for automation?

3 Answers  


supose i hv to acsess some functionlaties of a test in 1 machin , some part other machin how can acsess?

0 Answers   IBM,


Does QTP provides any tools for parametarization?

3 Answers   BirlaSoft,


What contains Data Driven Framework document in qtp?

0 Answers  


if you have the same application screen with 7 drop down boxes and approximately 70 values how do you test with QTP?

2 Answers   Ordain Solutions,


what is the difference between QTP 8.0 & 9.0?

4 Answers  


Tell me the QTP Advantages and Disadvatages ?

6 Answers   Accenture, CTS, GE,


Categories