Your SlideShare is downloading. ×
QTP Tutorial – 5: Passing Parameters between Actions <br />This short tutorial guides you to the process of passing parame...
Qtp passing parameters between actions
Upcoming SlideShare
Loading in...5
×

Qtp passing parameters between actions

4,180

Published on

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
4,180
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
59
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Qtp passing parameters between actions"

  1. 1. QTP Tutorial – 5: Passing Parameters between Actions <br />This short tutorial guides you to the process of passing parameters between Actions in <br />QTP. <br />Step-1: Create a test with the structure: Action1 on the top-level, Action2 embedded in Action1. <br />1) Open a new test.2) Go to Insert -> Call to New Action.3) Select the "After the current step" radio button.4) Click <OK>. The new action should be inserted into Action1.<br />Example:Action1Action2<br />Step-2: Define an input test parameter: <br />1) Go to Test -> Settings.2) Select the Parameters tab.3) Click the add button (+) for the Input parameters.4) Enter the following values:5) Name: TestParam6) Type: String7) Value: Hello8) Click <Apply> and <OK>.<br />Step-3: Define an input parameter for Action1: <br />1) Right-clicking on Action1 and select Action Properties.2) Select the Parameters tab.3) Click the add button (+) for the Input parameters.4) Enter the following values:5) Name: Action1Param6) Type: String7) Click <OK>.<br />Step-4: Parameterize the input action parameter in Action1: So that it pulls the value from the <br />parameter defined in the test settings. <br />1) Right-click on Action1 and select Action Call Properties.2) Select the Parameter Values tab.3) Click on the cell under the Value column for Action1Param. You will see a button on the right ofthe cell, click it.4) Select the "Parameter" radio button. "Test Parameter" should be selected by default.5) In the Name drop-down list, select "TestParam", which matches the input parameter created inthe test settings.<br />Step-5: Repeat steps 3 and 4 for Action2: <br />1) Except name the input parameter Action2Param, and when parameterizing the input value, <br />select Action1Param from the Name drop-down list. <br />Step-6: In Action2 insert the following line using Expert View<br />msgbox Parameter("Action2Param") <br />The above steps can be repeated if youwish to pass more Parameters <br />

×