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 |
Discuss the QTP Environment?
how and what kind of vb functions do us ein QTP?
4. How u will open the build automatically in QTP except using Systemutil.run command
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
How can we disable smart identification at the time of recording? Ideally, smart identification should be enabled only at the run-time.
what are the difference ways of parameterising?
What is the virtual object?
Sql questions to find second max salary and how to use joins
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
we have 10 actions in out test how can we convert 9th action is main action ? how ?
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.
How to record a qtp script ?