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
Can we create a qtp test from qc?
how to do the batch testing in test director using manual testing procedure?
Hi, i run scripts in one machine those r passed.when i run the scripts in client side those r failed.Give me such a scenario when ever u faced?
What are the types of environment variables in qtp?
Hi, I am supposed to automate mainframe application through qtp. I do not know how to start abt it. Can you plz help me in first initializing the process or do you anybody have a guide book or a link which guides me through the process of automating the mainframe applications and things involved in it.
ACTUALLY I AM WORKING IN THE DISTRIBUTION DOMAIN.MY COMPANY IS PROVIDING DISTRIBUTION SOFTWARE FOR PHARMA AND FMCG DISTRIBUTORS.HERE I AM USING QTP 9.2.HERE IN MY APPLICATION WHILE RECORDING ONE WINDOW APPEARS.IN THAT I CAN SELECT THE ITEM OR NO NEED TO SELECT.BUT WHILE RUNNING THE SAME SCRIPT THE WINDOW MAY NOT APPEAR OR APPEAR.HOW TO WRITE SCRIPT FOR THIS
What is quicktest professional?
Hi Samrat, Thank u very much, what u said it is right.
Explain how Does Run time data (Parameterization) is handled in QTP?
what and how to answer for the question "tell me about yourself ?" for 3 years experience. can anyone say inj detail please... its urgent
what is meant by function library?Public and private functions in function library? if private functions are applicable for only for the particular test means then y we have to add those to function library?
how could i download qtp in which i get add-in support for 'oracle' is there any way to get it? i finding but not getting pls help me out :)
Hi, how can we check or avoid the memory leakage in QTP9.2?
In QTP TEST DIRECTOR COMBINATION WHAT IS THE PURPOSE OF TEST DIRECTOR? In Somebody says to store test cases and design test cases.?ok fine , but In test director 5.0 , QTp not launching. what u do?
What is qtpro? What is a quick test professional?