Does QTP support Java Script also. Which is one is
preferrable for QTP, VB script or Java script
Answer Posted / govardhan palla
Please leave your mail id here. I'll surely drop a Zip file
to you which contains small demo Frame work on Flight
Reservation Application.
Anyhow some part of the demo I am keeping here, Please have
a look at below
QTP Framework Demo VIII
Changes for VIII
All the objects except for the Browser and Page are handled
by Descriptive Programming.
Files:
QTP Script BookFlightDemo.
This script will now only run in QTP 9.1 or later versrions
of QTP like 9.2,9.5 or 10.0 you should be able to backward
engineer the script. You need to convert it to full DP
objects and create a new script in your version QTP and
include all the files below.
Excel.vbs (Data Reading Functions)
GlobalVars.vbs (Holds Global values)
DP_Objects.vbs (Basic Descriptive Programming subs)
Navigation.vbs (Common Navigation subs)
Flights_Demo.xls (Data file (Datatable
replacement))
Instructions
Copy the folder Data to the root directory of you C drive.
Start QTP and open the script BookFlightDemoII.
There will be one Keyword in the QTP script “BookFlights”
This demo uses the Mercury Tours web site which you should
have a link to in your sample applications.
http://newtours.mercury.com/
The start condition is at the login screen.
Make sure all the vbs files are referenced in the resource
panel
QTP > Resources > Associated Function Libraries
When you run the script you will be asked to select a data
file select Flights_Demo.xls.
I have made a few changes from the first version of the
demo. The long lines of code created by QTP when recoding
have been replaced by simple short lines. For example
strBrowser = "Welcome: Mercury Tours"
strPage = "Find a Flight: Mercury"
'Departing From:
Call DPWebList ("fromPort", strFromPort)
The browser and page are set before the fields and are re-
set when required. Descriptive Programming is also used in
this demo now as shown in the example below.
'billAddress1
Call DPWebEdit ("billAddress1", strbillAddress1)
The script will run for 2 iterations it will report 1 pass
and 1 fail.
This is not a full solution for a framework if you want
that give me a job. I have provided examples of putting
common actions into subs that can be called this allows for
easy maintenance of common reusable actions, Again these
may not be ideal candidates for this but its an example of
what you can do.
Govardhan Palla
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Explain the concept of object repository and how qtp recognises objects?
How software automation specialist enter steps in the Expert View?
Can anybody post some real time scenario in qtp? please its very urgent.
What do you mean by iteration?
what is defenetion of kiran can u tell me plz CVS, SVN
Have you used xml check point in your project? How?
what is the structure for the data driven framework
How to call a test from another test?
How did you resolve conflicts present in Object Repository?
How to record application running on the Virtual machine?
i have an external excel datasheet where it only contains 3 rows. after qtp executed the code to import the datasheet, the datatable getrowcount method now gives me a different value, lets say 60,000+ instead of only 3. i did not have any values starting from row 4 of my excel file. why is this happening? this also results to the qtp report to load for a very long time.
can the activities of test case design be automated?
tell me QTP standards ?plz
Mention the test steps of qtp.
How many ways is to parameterize the value?