examples of user definied functions? how to write user
defined functions in qtp9.2?
Answers were Sorted based on User's Feedback
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 |
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 |
Answer / sonu
using function definition generator,we can also write functions.
| Is This Answer Correct ? | 1 Yes | 0 No |
what you mean by artifact,milestone...
what is the difference between the modular framework and datadriven frame work
describe some problems that u had with automating testing tool?
Diff b/w test scenario's and test Procedures?
explain how to write vb script in qtp?when will you write own script?
i am giving.multiple names like ram,raj,san etc....pls enter & search these names in google pade edit box through script... i told to interviewer, using Ms excel & test easily..but interviwer not happy with that answer?
please any one can explain the keyword driven framework. with gmail example.
What is the difference between client server application and web based application?
Can we run multiple QTP scripts one after the other without manual intervention? How?
why use Description programming? what is advantages and disadvantage of this methods?
How do you configure QTP AND Test director?
How to check the URL using Automation tool QTP