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 |
how to load the *.vbs (or) test generating script in a new machine?
Why is action split used by qtp?
Please Explain The QTP real Testing process with steps.
What is Descriptive Programing? In which cases, we will go for descriptive programing?
Connect to QC using AOM.
what are inputs for automation?
supose i hv to acsess some functionlaties of a test in 1 machin , some part other machin how can acsess?
Does QTP provides any tools for parametarization?
What contains Data Driven Framework document in qtp?
if you have the same application screen with 7 drop down boxes and approximately 70 values how do you test with QTP?
what is the difference between QTP 8.0 & 9.0?
Tell me the QTP Advantages and Disadvatages ?