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
How we can import data from database?
How to add synchronisation points in qtp?
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?
What is the difference between per-action and shared?
Is it possible to change the values of analog recording?
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.
is it possible to add sheets to excel at runtime
Can we use index on view?
Which scripting language used by quicktest professional (qtp)?
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?
what the difference between shared repository and per action repository?
What is reusable action?
how can i sent QTP results to the Html, notefile ,xl file give me the code using g mail login page
Can we record using all the modes in a single script? Explanation with example is appreciated
how to evalute defects in QTP script?