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 software automation specialist enter steps in the Expert View?

1678


What is different command used in command Prompt while using QTP?

1747


How to delete an object from the object repository?

595


How many types of actions are there in quicktest professional?

514


How many types of recording facility are available in quicktest professional?

567






Write the code for,In the page screen we have total 10 Links,out of these I have to click 9th link

869


What is synchronization? What are the ways you can synchronize?

653


Hi frens! I am testing VB project with MS Access database. At add button click my record is storing in data table and it is shown in datagrid. So at Delete button click i want to check datagrid rows 9before and after delete). so how can i do it using descriptive programming?

1475


how to write the descriptive programming in QTP for remove the object value and substitute, with a variable then call the validation from excel

1906


In the application that I'm testing is having a WYSIWIYG editor.QTP is recording editor's body as web element. I want to add some data to this web Element at run time. The problem is that I cant find a method to add contents to this web Element. Can any one come up with an answer for this. Thankx.

1447


How is test case write?

576


How to find operating system information using the qtp script?

585


How to data driven test for Win objects in QTP ?

1477


What are the common defects found in your project? (in qtp interview)

1619


when a test case is written how u test using qtp

1655