What is the difference between property and method?
Answers were Sorted based on User's Feedback
Property is nothing like a variable and Method is like a
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
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|
Answer / ravi
Properties are a useful way of expressing a feature of an object, allowing get/set in a common way that can be used by APIs like data-binding, reflection and serialization. So for simple values of the object, properties are handy. Properties can't take arguments, should not have significant side-effects*, and should return quickly and repeatably. Also, there is no such thing as an "extension property" (to mirror an extension method) nor a generic property.
(*=lazy loading etc isn't uncommon, however)
Methods (C# doesn't have functions) are better for expressing things that either change the state, or which have an expectation of taking some time and not necessarily being reproducible. They don't tend to work in binding / serialization etc.
Note that properties are actually just a special way of writing methods. There is little functional difference. It is all about expressing intent. The one thing you don't want to expose, however, is fields (the actualintEmployeeAge instance variable).
|Is This Answer Correct ?||2 Yes||2 No|
in a web table , i want you to click a particular object inside cell
Tell me the difference between the Data Driven Frame work and Keyword Driven frame work?
Hi. plz expalin abouit SetToProperty, SetRoProperty, GetToProperty, GetRoProperty,GetToPrperties. with examples.
A question was asked in a company-suppose, I am testing a website on QTP, all the time a new title bar is appeared on next page. Trying to use regular expression under key word driven testing but expert view is also appearing unchanged and error is also generating, do you have any best resolution for that kindly explain in detail. please dont give example of yahoomail, that is unable to clear my doubt.
explain qtp framework by taking an example?
1.IF SOME OBJECT IN APPLICATION IS NOT IDENTIFIED BY QTP? HOW WILL YOU OVERCOME THIS? 2. WHEN AND WHYDO U GO FOR DESCRIPTIVE PROGRAMMING? 3. WHAT IS THE DIFFERENCE BETWEEN VB AND VBA? 4.WHAT ARE THE REGULAR EXPRESSIONS YOU USED? 5.IF ANY REQUIREMENT IS ADDED IN YOUR PROJECT, HOW WILL YOU PROCEED TO DERIVE THE TEST CASES AND HOW WILL YOU PERFORM AUTOMATION FOR IT?
Does QTP work in UNIX environment
Tell me Three major differences between QTP & Winrunner?
Plz give the vb script for the following scenerio I have faced one issues while doing test in QTP. I have described the scenario below. 1. I have to test web application.In that i want to select from the drop down values in the application. 2. Suppose Drop down has 5 value "A,B,C,D,E".I would like to give value from data table of QTP. 3. For every iliteration it should select A,then B and so on
Using Object Repository is a advantage or disadvantage?
How can i get the image text that changes dynamically? Here i have used "GetROProperty", but it's not working. I used like Ex:Browser("webmail").Page("inbox").image ("captchaimage).getroproperty("innertext/text/value")
• Re –Engineering the regression testing from 0% to 60% automation. This has saved 4-mandays in every release. what doeas this statement means