I am just a beginner in QTP. Could any one explain me in
detail how to automate adding two numbers and getting the
result in QTP. Also I would like to parameterize the
inputs. I have tried but getting an error like 'Can't use
sub.....'(can't recollect the exact error)

Answer Posted / sailaja

One way is:Dim a,b,c
a=10
b=20
c=a+b
msgbox c

Anotherway:Place the input parameters in these: edit-
>Action Properties->Parameetrs->Here we can add input &
outputparametrs.
Dim a1,b1
a1=Parameter("a")
b1=Parameter("b")
c=a1+b1
msgbox c

Aliter: Add the values of both a,b of parameters in Action
Properties.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How would you export a script from one pc to another in qtp?

653


What is the registration process and examination fees?

547


How you can decide which type of object repository you have to use?

698


What is qtpro?

587


your coming from electrical backgroung..but y ur coming to software side?

1380






What are the views available in quicktest professional (qtp)?

565


what r the verstions from 1st to present (verstions) of mercury tools (like winrunner,QTP,Loadrunner) ? Chandana

1458


when I try to run below script in QTP "totalPages" value is 2. But i am getting error message (Type mismatch: 'totalPages' Line (): "For i=1 to totalPages".) totalPages=Browser("Name:=User").Page("Title:=User").WebElem ent("innertext:=of.*").GetROProperty("InnerText") msgbox totalPages For i=1 to totalPages rnum=Browser("Name:=User").Page("Title:=User").WebTa ble("column names:=User Name;ID;Last Name;First Name").GetRowWithCellText("store4") If rnum>0 Then r=rnum Exit for End If Browser("Name:=User").Page("Title:=User").WebElement ("html tag:=A","x:=471").Click MsgBox "Exit" Next

3260


Explain about the test fusion report of quicktest professional (qtp)?

535


what is the difference between IE & Netscape in web testing on a log in page

1784


what is the difference betn QTP 8.0 AND PREVIOUS VERSION

1949


What is the qtp testing process?

590


If you giving priority as p0, as a developer if I give priority as p2, What happens In user defined function ?

579


Explain the Different types of QTP test assets and their extensions?

601


Explain the concept of object repository and how qtp recognises objects?

524