Hello,

I am working on automating unix application using QTP via
terminal emulator.Recording and playback works as i execute
my test case. I need to parameterise my data now.
Steps to be followed
1. go to the application
TeWindow("TeWindow").Window("Connect").WinButton
("Connect").Click
2. Make a transaction to an account
I am able to make transaction one at a time (one person
when i run the script) and the script is as below and works
fine.
TeWindow("TeWindow").TeTextScreen
("TeTextScreen").Type "./4ee.sh"
TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type
micReturn
TeWindow("TeWindow").TeTextScreen("TeTextScreen").Sync
TeWindow("TeWindow").TeTextScreen
("TeTextScreen").Type "a21100002"
TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type
micReturn
TeWindow("TeWindow").TeTextScreen("TeTextScreen").Sync
TeWindow("TeWindow").TeTextScreen
("TeTextScreen").Type "tcccc"
TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type
micReturn
TeWindow("TeWindow").TeTextScreen("TeTextScreen").Sync
TeWindow("TeWindow").TeTextScreen
("TeTextScreen").Type "test"
TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type
micReturn
TeWindow("TeWindow").TeTextScreen("TeTextScreen").Sync
TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type
micF1
TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type "6"
TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type
micF1
TeWindow("TeWindow").TeTextScreen
("TeTextScreen").Type "xexit"
TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type
micReturn
TeWindow("TeWindow").TeTextScreen("TeTextScreen").Sync

3. Now i need to Make a transaction to the account for the
list of people available from data table. How do i do this?
Please let me know if you can

Thanks,
Chaya

Answer Posted / lmacasiljig

You can parameterize your data in many ways see samples
below:

1. Via DataTable

TeWindow("TeWindow").TeTextScreen
("TeTextScreen").Type DataTable("Column1", dtlocalSheet)
TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type
micReturn
TeWindow("TeWindow").TeTextScreen("TeTextScreen").Sync
TeWindow("TeWindow").TeTextScreen
("TeTextScreen").Type DataTable("Column2", dtlocalSheet)
TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type
micReturn



Where "Column(n)" are defined in QTP DataTable. These
columns will hold your data.

2. Scripted Component Parameters (Using BPT) or Action
Parameters

TeWindow("TeWindow").TeTextScreen
("TeTextScreen").Type Parameter("Column1")
TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type
micReturn
TeWindow("TeWindow").TeTextScreen("TeTextScreen").Sync
TeWindow("TeWindow").TeTextScreen
("TeTextScreen").Type Parameter("Column2")
TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type
micReturn

Hope these help.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

please post the interview questions for QA position in FACTSET

3936


how to find that tools work well with ur existing system?

1346


what are the utilities and drivers

1832


How are actions and functions different in QTP?

644


How does qtp recognize objects in aut?

574






Tell some commonly used Excel VBA functions?

587


What processes will be required to manage updates to the web site's content, and what are the requirements for maintaining, tracking, and controlling page content, graphics, links, etc.?

596


How to get popup error message.

1021


in qtp if we record a object and we record the object using virtual wizard then by which way the object is recognized that means recorded

1511


I want to configure the OR and library files to a particular QTP test during run time. Note: OR and Library files are located in Quality Center. Is it possible in QTP? Anybody having code?

1360


what is the latest version of QTP? Main difference between 9.2 and 10 version

1536


How did you use regular expressions in QTP and also in WR?

2153


How is a Step generator used in UFT?

643


how do we know whether all objects are stored in the object repository or not? how can we know if a particular object is not stored in the repository?

1304


what type of values given to objects. EX::Set oBrowser=Description.Create oBrowser(“micclass”).Value=”Browser”

1475