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
How to find the difference between 2 dates in qtp?
what is clean sweep?
How do we handle run-time errors?
In qtp is it possible to check broken links of a page?
Is it possible to change the property value at runtime? How it is possible?
hi i am working with vbwindow on qtp.first i am openning qtp whenever open qtp my application not open that time generated error like "Runtime error 0" and fatal error:automation error how to solve this problem pls tell me
how do u manipulating INI, DLL and / or registry files in support of your test environment? actually what do u mean by INI and DLL or registry files. plzzz its urgent do answer
Can any one explain me what is the procedure to connect the remote desk by using QTP 9.2 ?
Excel sheet having some datas and some datas present in the application (in table). How will you compare these two datas? Write code to fetch datas from Excel sheet.
Does Low-level recording capture mouse movements?
Tell me about qtp?
Explain how Selenium is different from UFT?
please any one can explain the keyword driven framework. with gmail example.
What is the use of "New Property" in "Add properties" of testobject properties in object repository. How can i use "New properties" while writing scripts if i have assign some values to the testobject properties Can anyone help me? plz
How to Get the Run-time value of an object under that web app under Test to the local data table sheet of that Action?