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 the frame work your using in automation testing

2 Answers  


How can we upload pdf files in qtp?

1 Answers   Syntel, TCS,


suppose take one row in a row 16 columns is there.in 16 columns 16 numbers is there.but i want to get each 3 column number.o/p :5 columns get in 16 columns means. so can anybody write this function? plz send if u know the answer.

2 Answers   Bosch,


How to enable the text check point in qtp? By default it is disables

1 Answers   Sify, ssinformatics,


Hi, how can we retrieve a specific value from Excel Sheet (Not datatable. for externel file).i mean to say from .xls file. and also tell me from xml file and .doc file. and how can u parameterize ur script from .xls file.(Not data table).

2 Answers   Cap Gemini,






Hi, can explain the draw back of manual testing.plz send me the answer to my mail id deepthip1985@gmail.com

0 Answers  


What is InStr()

6 Answers   Kanbay,


Without QTP (or any Testing tool) can we able to test the GUI part of the Applications. for Example generating the Scripts in Notepad and Executing them Using VB. Is it Possible to do so..

2 Answers  


I am trying to read the rediffmail usign the below code. But facing problem, while i user to get the link of the mail, i am getting all the link of the page, While i just want to get only mail name - link (not all the link of an page) so that i able to read the mail message by clcking on them in qtp. Dim Lnk,Webcheckbox Set Lnk= Description. Create '********* To count and display the webcheckbox Lnk("micclass" ).value=" Link" set LinkName= Browser("Welcome to Rediffmail:" ).Page("Welcome to Rediffmail:" ).ChildObjects( Lnk) LinkCount=LinkName. Count msgbox LinkCount For i=1-1 to LinkCount-1 DataTable.SetCurren tRow(i) DataTable.Value( "Name",1) =LinkName( i).GetRoProperty ("name") Next Waiting for the reply Praveen Saini

1 Answers  


What is qtpro? What is a quick test professional?

0 Answers  


i am trying to capture the URL from the open browser and store it. pls give me solution how we can do this in QTP. thanks

2 Answers  


I want to know what are QTP functons and what are VB script functions. What is the difference between them.When we have to use these functions.

0 Answers  


Categories