hi,
i was adding the two numbers in qtp scripts but i didn't get
the answer. see my below script, i dont know wht is the problem.
i passed the value a=3 b= 2, i got the ans 32 instead of 5.
i thing the problem is to be c = a+b
my mail id karthis4u@gmail.com
Dim a, b, c
a = inputbox("enter the a ")
b = inputbox("enter the b ")
c = a + b
print c
Answer Posted / kavi
Hi,
prasad's code was right.. but we should pass values for the
function sum
dim a,b,c
function sum(a,b)
c=a+b
msgbox c
end function
x=sum(3,2)
Is This Answer Correct ? | 2 Yes | 4 No |
Post New Answer View All Answers
What are the check points can be inserted without recording?
How many add-ins comes by default with quicktest professional (qtp)?
Is it possible to change the values of analog recording?
If I change the property value at runtime is it effect is object repository?
How to use Environment parameterization? Explain with an example.
How is recording done when a application is over lapping the QTP application it gives a message object not recorded
Whats the realtime QTP testing process
I am facing an issue of object identification with the dropdown element of DHTML grid. When I tried to recognize these different dropdown objects, QTP identifies only one object for all the dropdowns. Hence, selection of different data from different dropdowns list is an issue. To overcome this problem, i have used Descriptive Programming technique by creating different object descriptions which have all the other properties same but differ only in one property i.e. ‘X’ location of the element on the screen. Hence, i have created distinct object descriptions that would allow us to select values in different dropdowns. The code is given below. But still I am unable to identify distinct dropdown objects. ‘Object Description for Dropdown Cell Status Set objCellStatus = Description.Create objCellStatus("micclass").value = "WebList" objCellStatus("name").value = "select" objCellStatus("x").value = 219 ------ ‘X’ Axis value for cell status drop down ‘Object Description for Dropdown Sub Segment Set objSubSegment = Description.Create objSubSegment("micclass").value = "WebList" objSubSegment("name").value = "select" objSubSegment("x").value = "319" ------ ‘X’ Axis value for sub segment drop down Please help... This is specific to DTML grid(Drop down object)
What do you to script when objects are removed from application?
how will load the object during runtime?
what is the frame work in J-meter?
how to know no.of mails in our g mail by using vb-script
I want to know what are QTP functons and what are VB script functions. What is the difference between them.When we have to use these functions.
can any boby tell me what is method or steps to connect the remote desk top by using QTP 9.2 version?
There is an excel file of 1 to 100 sheets how you will iterate through it?