how do pass parameters from one action to another action

Answers were Sorted based on User's Feedback



how do pass parameters from one action to another action..

Answer / ravi_kanakam

We can pass parameters from one action to another action in
the following three different ways.

1. Datatable
2. Action parameters
3. Environment variables

Is This Answer Correct ?    5 Yes 2 No

how do pass parameters from one action to another action..

Answer / aarati borse

Whatever Ravi has mentioned it is true...
Practically we can do like this..
Here I am using Action Parameters...
REquirement in Flight Reservation Apps is

Name by which user is getting logged in by same name a new
order also should get inserted..

1)Record for login window.
2)Rename the action as login_name
3)Pass the op value in action parameters as "agent_name"
4)By using Getro property fetch the agent name value and
store it in parameter agent name itself.
code willbe
parameter("agent_name")=window("FR").........winedit("Agent
Name").getroproperty"text"
5)save the test.


6)Now record for the insert order in new test
and make changes as follow

Window("FR").winedit("Name").set parameter("agent_name")
7)Make this action reuasable and rename it as insert_name
8)Save all changes in the test.
9)Move to first test again that is in login_name action
10)Keep ur cursor at end and call the existing action i.e
insert_name.
11)In expert view u will get the statement as
RunAction "insert_agent",oneIteration
we need to add as
RunAction "insert_agent",oneIteration ,parameter
("agent_name")
12)save d changes again..

13)now run login_name action

It will work...

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More QTP Interview Questions

Explain the difference between check point and output value?

0 Answers  


if there is a web table of having row and colmns.a button is placed at 2nd row's 3rd column which is worked for both edit and delete..how to write script for the button to test both operation on the web table using desriptive programing.. plz help me on script wheather using getroproperty Q2)what is the command for taking valiue from a web table in qtp

6 Answers   Logica CMG,


what is mean by soi in object identification

1 Answers  


Hi, I got error message as "object does not support this property or method: "Test.Actions" when i execute the following line of script on QTP 9.0 Dim qtApp, qtRep Set qtApp = CreateObject("QuickTest.Application") Set qtRep = qtApp.Test.Actions("Action1").ObjectRepositories Can anyone tell me where i am wrong.

0 Answers  


how can we perform web datatable operations on webpages(Like rowcount,col count,cell data)?

2 Answers   Syntel,






I got an error "The"flightres" Dialog was not found in the Object Repository. Check the OR to confirm that the object exists or to find the correct name for the object." while running the following script Set flightres=description.Create() flightres("text").value="Login" flightres("Class Name").value="Dialog" Set agent = description.Create() agent("nativeclass").value="WinEdit" agent("attachedtext").value="Agent Name:" Set pwd = description.Create() pwd("nativeclass").value="WinEdit" pwd("attachedtext").value="Password" Set button = description.Create() button("nativeclass").value="WinButton" button("Text").value="OK" Dialog("flightres").WinEdit("agent").Set "test" Dialog("flightres").WinEdit("pwd").Set "mercury" Dialog("flightres").WinButton("button").Click Please let me know if i made any mistake in the above script...?

4 Answers  


Can QTP be used for GUI testing ?, We are using Java with MySQL and Operating system is Linux. We are NOT using the web.

0 Answers   IBM,


What is keyword driven framework, what is "key" in It.

2 Answers   IBM,


in a web page How to check and display a particular word from a paragraph?

0 Answers  


what is the syntax for regular expression in QTP? how to create user defined functions in QTP?

6 Answers   CTS, MBT, TCS,


I have two actions in my QTP test and two iterations in my DataSheet. I want to execute the Action 1 for the two iterations only after which i want to exceute the next Action2. How is this possible?

4 Answers  


What is checkpoint in qtp?

0 Answers  


Categories