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 |
During test run,How will you copy/paste from/to clipboard?
I need your help in the below topic using QTP Automation tool. How to automate the right click of mouse on a context menu? 1)Tried low level recording which is working fine but making use of co-ordinates. 2) Also tried changing the mouse settings and properties using Tools ->WebEvent RecordingConfiguration and created a configuration file with required mouse click events and used which did not work.
Is it possible to change the values of analog recording?
Is it possible to merge two object repository files in qtp?
What are they Advantages and Disadvantages in QTP 9.2?
1.How recognize QTP Dyanamic Image? (suppose tha wedpage contains 3 logos..1 square 2.circle 3.rectangel)there changing at same position how to capture that)
write code to read and write data from file?
How to call a function in QTP?
Inserting a Call to Action is not importing all columns in Datatable of globalsheet. Why?
we have 10 actions in out test how can we convert 9th action is main action ? how ?
Hi, Can any body please tell me how to create framework in qtp & where i can get some material to learn about it. regards, rahulT
In QTP what is the difference between Step-in, Step-out, Step-over ?