What is the difference between property and method?
Answer Posted / amarendra kothuru
Property is nothing like a variable and Method is like a
function.
You cannot pass parameters to a property and you can
directly assign value to it.
for a Method, set of lines of code and when it is called
that executes set of lines written in it and generates the
results. you can pass parameters to the method and you can
retirve the result from the method. You cannot directly
assign any value to it but you can pass it by
Parameterizing it.
Ex: Reporter.Filter - Here Filter is a property
Reporter.ReportEvent - Here ReoprtEvent is a mothod.
Reporter.Filter = 0 'this enable the results for the test
results. Here you can directly assig value to it
Reporter.ReportEvent micPass, "Msg1","Msg2". Here we are
passing three parameters to the methos ReportEvent that
send the results to Test Results.
Reporter is either a prepdefined Abstract class/interface
in QTP that has so many Properties and Moethods
Is This Answer Correct ? | 31 Yes | 6 No |
Post New Answer View All Answers
what is ODC and GDC?
if there is a web table of having row and colmns.a button is placed at 2nd row's 3rd column which is worked for both edit and delete..how to write script for the button to test both operation on the web table using desriptive programing.. plz help me on script wheather using getroproperty Q2)what is the command for taking valiue from a web table in qtp
What is a Patch in QTP?
Does QTP run in any environment?
What are the differences between qtp and winrunner?
If the weblist is identified as webelement,and by clicking on webelement if the values are displayed,and if the values the values also identified as webelement.then how to fetch the values through script?
what is clean sweep?
how to find that tools work well with ur existing system?
How many types of actions are there in quicktest professional (qtp)?
write the vb script for call to new action in qtp?
hi, FOR 3+ QTP INTERVIEW, FOR EXAMPLE WE PUT ONLINE BANKING SYSTEM PROJECT IN OUR RESUME, IN PROJECT MANAGER ROUND...WHAT R THE MAJOR QUESTIONS ARE ASKED IN P.M? PLS TELL ME ATLEAST 10 QUESTIONS?.....AND IF POSSIBLE POST ANSWERS ALSO....
Please guide me release notes of Automation once scripts are completed
How QA specialist can identify when programmatic descriptions are useful?
Can any one tell me how to write a script for selecting open option in File menu of A word document.here you have to add objects to OR.try like that and give me the ans.i asked this question to so many but no one knows.if any one know the answer plz let me know
I have many listboxes in my application. I have to check whether the contents inside the listboxes are in sorted order or not..can anyone please send the code as early as possible