Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to pass parameters into an action.Please explain me
with examples

Answer Posted / deepakm82

Hi Rayudu,

i will take the example that you have taken.
C = a + b
Now you want a and b to be parameterized.
So for that you have to pass the value of a and b using the
datatable in QTP.
Select 2 columns in datatable and name them Value_1 and
Value_2.You can choose either Global datatable or action
datatable.Suppose you choose Global datatable.
Now put a value say 3 under column Value_1 and put another
value say 5 under column Value_2.
Now this is how you gonna write it:

c= Datatable.value("Value_1",dtglobalsheet) +
Datatable.value("Value_2",dtglobalsheet)

Now is this solve your problem? or if you have any further
queries then just reply...

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How we can import data from database?

1173


How to add synchronisation points in qtp?

1014


Is it possible to refer the same object for referring more than one object that are of different class using the descriptive programming approach? Suppose my code is 'To create the object named as obj Set obj=Description.Create() 'To define the values obj("title").value="IE" obj("type").value="text" obj("html tag").value="INPUT" 'To set the value Browser("IE").Page("Yahoo").WebEdit(obj).Set "xyz" Can I refer the "obj" object for the three objects like Browser,page and webedit objects? If so how?

2072


What is the difference between per-action and shared?

1091


Is it possible to change the values of analog recording?

1083


how to use the QTP choose the data from oracle? e.g. i input the identity card NO. this will be add new record in the database ,and now i want get this record's prime key.

1743


is it possible to add sheets to excel at runtime

3971


Can we use index on view?

2061


Which scripting language used by quicktest professional (qtp)?

1109


You will receive the mail in your outlook from client at night time to go ahead for the execution. Based on the mail you need to trigger the batch run. What is the QTP Code for this?

1871


what the difference between shared repository and per action repository?

1005


What is reusable action?

1043


how can i sent QTP results to the Html, notefile ,xl file give me the code using g mail login page

2266


Can we record using all the modes in a single script? Explanation with example is appreciated

1815


how to evalute defects in QTP script?

1953