What is the use of "Registeruserfunc" when should we use
it?
Note:Please do not copy paste the date from QTP help.
I tryed it.But I don't Understand where should we use
exactly.
Answer Posted / rajeev
We are using this method to register an user defined function to QTP so that tool will display the registered user defined function in the drop down list directly like when we are using the inbuilt functions.
For example if we are preparing the script by using cint,cdbl,time,date functions etc... these functions are visible in drop down list .
RegisterUserFunc:- We are using this method to register the user defined function for particular class in QTP.
Syntax:- RegisterUserFunc,"ClassName","Function Name","Method Name",True
Example:-
Public function ButtonEnabled(Obj)
var= Obj.GetRoProperty("Enabled")
If var="True" Then
msgbox "Pass"
else
Msgbox"fail"
End If
End Function
Navigation:- Prepare the user defined function > like above in QTP > Copy the function and paste it in notepad > save as .vbs file > associate the .vbs file to the QTP > Prepare the test script like below
Dialog("Login").WinEdit("Agent Name:").Set "rajeev"
Dialog("Login").WinEdit("Password:").Set "mercury"
Dialog("Login").WinButton("OK").ButtonEnabled("cancle")
Dialog("Login").WinButton("OK").ButtonEnabled("OK")
| Is This Answer Correct ? | 3 Yes | 3 No |
Post New Answer View All Answers
How can I import environment from a file on disk?
what r the verstions from 1st to present (verstions) of mercury tools (like winrunner,QTP,Loadrunner) ? Chandana
how to disable the pop ups through QTP using a script
How to build scripts that access data from external sources?
Can we call qtp test from another test using scripting. Suppose there are 4 tests and I want to call these tests in a main script. Is this possible in qtp?
If the objects hierarchy is changing from build to build, then how you will handle that condition?
Write a QTP script to enter a keyword in to Google search engine?
what and how to answer for the question "tell me about yourself ?" for 3 years experience. can anyone say inj detail please... its urgent
What is an expert view and keyword view?
before launching qtp, we need to close all the open browsers u dont know what are all the browsers either it might be ie,mozilla etc and u dont know how many brosers are open.... u need to close all these before launching qtp.. can anyone plz temme d solution...
Explain the concept of object repository and how quicktest professional recognises objects?
Can any suggest me what is exposure testing?
The structure of keyword driven frame work is like a folder structure the different sub folder are 1-functional libray folder 2-object repository folder 3- database folder 4-appliction1.xls 5-initalzation vbs file 6-sequence file 7-driver script 8-test case list file My question is whether these are in a local server machine or in our pc.((whether It like Vss). can u give example of driver script(code)
How you are developing the script? Using record and play back or manual?
Can anyone share/send me QTP 8.2 Crack as I had it before but now it's virus affected. Pls send me on Sawale.vijay@gmail.com Thanks, ~Vijay