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


Please Help Members By Posting Answers For Below Questions

if anyone has idea of the interview procedure in covansys, plz send me a mail?

1532


What is ObjectParamater?

1571


requirement is for combo box your expected value is str= "Denver.Frankfurt.London.Los Angeles.Paris.Portland.San Francisco.Seattle.Sydney.Zurich" you must get the text in combo box and need to compare them how

1478


How do we analyze the checkpoint results?

581


What is qtpro? What is quick test pro? What is a quick test professional?

593






If the objects hierarchy is changing from build to build, then how you will handle that condition?

619


What is a programmatic description?

603


What is the parameterization?

579


How to execute the WR Script through QTP? I have WinRunner script with initialization script, common scripts, GUI AND functions. I connected WR through QTP with "call to WinRunner" option but I am getting problem after connecting to WinRunner i.e. showing "Do you want to quit now" with 'yes' and 'No' message box

1831


What is active screen?

564


Can anyone share/send me QTP 8.2 Crack as I had it before but now it's virus affected. Pls send me on Sawale.vijay@gmail.com Thanks, ~Vijay

2662


Explain the views in the QTP GUI?

619


Does QTP run in any environment?

614


Your roles and responsibilities and daily tasks? (As automation tester)

2580


What are the Test design techniques you uses in ur project?

1487