Thursday, April 21, 2011

Automatically Parameterizing Steps

Automatically Parameterizing Steps in QTP 11.

1.Open a new Test in QTP.
2.Open IE.
3.Start Recording.
4.Navigate to
5.Type "QTP" in search box.
6.Click Google Search button.
7.Close IE.

Below code is generated:

Browser("Home").Navigate ""
Browser("Home").Page("Google").WebButton("Google Search").Click
Browser("Home").Page("qtp - Google Search").Sync

Now go to Tools -> Options, General Tab.
Check the "Automatically parameterize steps using" checkbox and select Global Data Table Parameters.
Click Apply and Ok to close the Options window.
Repeat the above steps (1-7).
Now as soon as you click on Stop (Recording), QTP automatically parameterizes your relevant steps.

As you can see in our example QTP automatically parameterized the Navigation step.
For more on this see Guidelines and Considerations for Automatically Parameterizing Steps in QuickTest Professional Help.