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

Hi friends, I have heard that it is required to have an application hosted in the same machine where we use QTP. Otherwise QTP may identify the objects incorrectly. Please clear me is it true.

3 Answers  


Flight reservation using input and output parameter script.

1 Answers  


scalability testing comes under in which tool?

4 Answers   EpuraTech,


can any body help me out by providing links/material for descriptive programming in QTP otherwise can you post decriptive programing based interview Questetion&ans. plz help me out . i need it.

1 Answers   ADP,


How to capture screenshots of Exceptions/Errors during run- time?

12 Answers   Ordain Solutions,






hai, i completed my b.tech in 2010 with 62.3%. i having knowledge on manual testing and Qtp. i want Relavent experience in testing.watever may be d salary i dont bother..I just want to gain knowledge. i dont have good communication skills.

0 Answers  


What are the Application Functions available in QTP?

0 Answers  


What is qtp window?

0 Answers  


How to interact tool & application build in QTP?

0 Answers  


What is Regular Expressions?

2 Answers  


what is the automation framework that ur company using(actual procedure,not theoritically explination)

1 Answers  


How to test background color and dynamic images which are moving during runtime?

7 Answers   CTS,


Categories