Saturday, May 31, 2008

About Functions

Function is a group of methods and instruction and it can be access by calling that function.

User defined functions can be coded as part of QTP files or can be coded as separate ".vbs" files.
These can be associated as library files under Run Settings. This would enable you to create a library functions which can be used across scripts as and when required.

Example for User Defined Function for WebEdit Class:

Public function edit(name) 'Defining the function
Browser("BrowserName").Page("PageName").WebEdit("User ID").set name
End Function

Call edit("rajaputra") 'Calling the function

No comments:

About Me

My photo
Hi all,I am Arun Singh Rajaputra. I am working as a Project Lead in a reputed organization in Hyderabad, AP, India. I have little bit knowledge on Quick Test Professional and like to share my knowledge to all through this blog.

Subscribe to get updates on this blog

Enter your email address:

NOTE

Some of the posts posted in this blog are collected and most of them have been prepared by me. If any one have objections regarding any copied posts. Please mail me so that I can take a necessary action on that post.