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

Answers were Sorted based on User's Feedback



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

Answer / akshar

hi u can pass parameters into different actions by
navigating to file in qtp there go to settings tab & click
on parameters tab where you can specify the name ,type &
the default value of it..Apply it & use it in your
script..If you have not understood write to me

Is This Answer Correct ?    4 Yes 1 No

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

Answer / pk

First you have to declare the Input/Output Parameters in the
Action Properties (Right click action icon and select). Then
you can access these parameters through the Parameter object.

Say you have declared two Input parameters
a (as number, value= 25) and
b ( as number, value = 30)

Then you can access these Action input parameter with in the
action using

c = parameter("a")+parameter("b")
msgbox c (should display 55)

Is This Answer Correct ?    2 Yes 0 No

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

Answer / 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

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

Answer / rayudu

I know that what u have explained.But how to use those
parameteres in a an action.I want the script that how to
use input action parameters.That is why I already asked
that I want explanation with examples.
suppose I want to pass 2 values for a,b and would like to
get the result in "c". see below code

c=int(a)+int(b)

How should I pass parameters here and how should i write
the code for passing parameters.How should i call that
action. give me the detailed exp..

Is This Answer Correct ?    0 Yes 2 No

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

Answer / rayudu

Thanks for your reply Deepak! But my question is not that.
By using Action Parameters.EX: I would like to enter the
values in Parameter tab of the Action properties.



Name type Defaultvalue description
A Number 25 First value
B Number 30 Second value

My question is How should validate these values in a script
c=int(a)+int(b)
I am calling this action in another action like
RunAction Action1,Oneiteration
But it did not resulted 55.
I know how to pass parameters through datatable.
Please answer it if u know

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More QTP Interview Questions

How u execute test cases in manual testing?

2 Answers   Accenture, Infosys,


How does QTP identify an object?

0 Answers  


Suppose there are 100 links in a web page and the number of links will be changing dynamically from time to time. I need code such that every time i had to click on the last link of the web page.

4 Answers   Virtusa,


How can we parameterize our test, values in flat file. Ex:- Values in notepad, with that values i want to parameterize the test.

3 Answers   Ordain Solutions,


Can u call txt extension file in QTP?

2 Answers   Cap Gemini,


One build is delivered. in that build button name is submit. but in the next buit that name of the button changed as login.are u continue with previous recorded script or u make any changes?

6 Answers   Covansys,


Does QTP work in UNIX environment

5 Answers   BirlaSoft, C1 India,


what is key word driven frame work ? why it is called like that ? what is the diference between keyword driven and data driven frame work ?

0 Answers  


How can we translate the steps between the Keyword and Expert Views?

1 Answers  


What is CMMP and CMMH?

0 Answers  


is we can import the object repository from external source. if it so then how?

5 Answers  


Among all the check points what is the most important checkpoint?

1 Answers  


Categories