examples of user definied functions? how to write user
defined functions in qtp9.2?
Answer Posted / 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 |
Post New Answer View All Answers
i need code for how to click on particular mail in utlook mail box .its urjent Thank You Balaji
What is the qtp testing process?
What is the difference between the design-time and run-time data tables?
I want to configure the OR and library files to a particular QTP test during run time. Note: OR and Library files are located in Quality Center. Is it possible in QTP? Anybody having code?
When to use shared and local object repository?
what is supply chain management?
how will you check how many members visited the website www.infosys.com?
What is the use of defining a newobject in the object repository "Define New TestOject". How to use this further. If we define new testobject, how can it recognizes the objects properties of any application.
How many types of recording facility are available in quicktest professional (qtp)?
What is qtpro? What is quick test pro? What is a quick test professional?
What is synchronization point in QTP?
I opened gmail login into gmail and i have to save (Pass or move) all the mail into notepad please give me code Thanks of all
how to write the descriptive programming in QTP for remove the object value and substitute, with a variable then call the validation from excel
How will you check that your test cases covered all the requirements?
What are the technics follow in writing VB script?