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



Hello, I am working on automating unix application using QTP via terminal emulator.Recording an..

Answer / 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

More QTP Interview Questions

What is a data driven test in qtp?

0 Answers  


Is QTP Object Oriented language or Object Based language? What are the OOPS concepts it will support? Why it wont support all the OOPS concepts?

1 Answers   CTS,


What is the maximum size of Object Repository in QTP 8.2?

4 Answers   Mphasis,


What is the logic for reading(exporting)the data from flat files to QTP?Can anyone explain me with an example? I appreciate it!!! Thanks!!! Prasanna

1 Answers  


How many ways we can parameterize data in QTP?

1 Answers   Crea,






What is object state in trigger events,in recovery scenario.write a script to handle this.

0 Answers  


what is the difference between window command and dialog command

1 Answers  


How to find RAM size by using QTP?

2 Answers   IBM,


Hi Friends, Can you please answer these questions of QTP Certification? 1.) What are bitmap checkpoints sensitive to? A. Image size and object type B. Object type and image type C. Screen resolution and object type D. Screen resolution and image size 2.)What are the phases in the QuickTest workflow? A. Plan, Record, Enhance, Run B. Prepare, Record, Verify, Run C. Plan, Create, Verify & Enhance D. Prepare, Create, Verify & Enhance, Integrate 3.) What are the two most commonly used ADO objects? A. Fields B. Execute C. Connection, RecordSet D. Open, ConnectionString 4.)What options are available to filter objects in the Target Object Repository pane when merging object repositories? A. Show all objects or Show only objects with conflicting object types B. Show all objects or Show only objects with conflicting descriptions C. Show only objects with conflicting logical names or Show only objects with conflicting object types D. Show only objects with conflicting logical names or Show only objects with conflicting descriptions 5.)Which of the following is an example of a missing resource? A. An object B. Run Results C. A Regular Action D. An External Action 6.)What method is used to retrieve the number of columns in the query results? A. Fields.Count B. Fields.Item(EOF) C. Fields.Count(BOF) D. Fields.Count.Value 7.)In VB Script functions, which one is false among the following a. Variables must be declared before use b. Variables may not be declared before use c. Variables may be declared without data types None

2 Answers  


how to create the varibles and how these are connect to qtp? plz tell me

3 Answers  


what is verification & validation?

2 Answers   Accenture,


what are SetToProperty, SetROProperty,GetToproperty scripting?

2 Answers  


Categories