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

Discuss the QTP Environment?

0 Answers  


how and what kind of vb functions do us ein QTP?

2 Answers   Ordain Solutions,


4. How u will open the build automatically in QTP except using Systemutil.run command

4 Answers  


i this is balaji from chennai i have 4 yrs exp in testing and my qualification is bsc computers i completed in correspondace in which companiies accept the correspondace plz let me know

1 Answers   Accenture,


How can we disable smart identification at the time of recording? Ideally, smart identification should be enabled only at the run-time.

3 Answers  






what are the difference ways of parameterising?

1 Answers  


What is the virtual object?

0 Answers  


Sql questions to find second max salary and how to use joins

0 Answers   Deloitte,


what is KEYWORD DRIVEN TESTING ? I M NOT ASKIN WHAT IS KEY WORD VIEW PLZ ANS FOR ONLY WHAT IS KEYWORD DRIVEN TESTING EXACTLY THANX

3 Answers  


we have 10 actions in out test how can we convert 9th action is main action ? how ?

5 Answers  


Hi All,I am in wierd situation that my laptop is installed with QTP11 and os is xp sp3.The problem is the descriptive programming which i have written is working in other laptops and it is not working in my laptop.it is clicking the link which is above the testbox instead of typing it in textbox below it.It is same with the other working scripts written by another person.

1 Answers  


How to record a qtp script ?

0 Answers  


Categories