Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Can anyone tell me how i used QTP 9.2 use for GIS based S/w with an example?

2177


Explain how qtp identifies object?

1021


What is the use of defining a newobject in the object repository "Define New TestOject". How to use this further. If we define new testobject, how can it recognizes the objects properties of any application.

1983


In the application that I'm testing is having a WYSIWIYG editor.QTP is recording editor's body as web element. I want to add some data to this web Element at run time. The problem is that I cant find a method to add contents to this web Element. Can any one come up with an answer for this. Thankx.

1902


Explain the difference between call to action and copy action?

923


In a flight window we have to enter the name and meal request for every passenger.In that window if we give Total passengers=1 then the Psngr1 name field and psngr1 meal request field will reflects.if we give Total passengers=2 then Psngr1 name field and psngr1 meal request field,Psngr2 name field and psngr2 meal request field will reflects and so on.if total psngrs=100 then will we capture all the fields for the psngrs to Automate the app how we can handle this scenerio thru Descriptive programming?

1851


Which advantages helping QTP to hold the position of "Market Leader" for such a long period?

1782


What is difference between shared and local object repository?

1065


How many types of recording modes in qtp? Which will be used when?

924


how can i pass a "cript"as a parameter in to a function

1930


What is the differences between image check point and bit map check point?

1005


What are the advantages of qtp?

961


How to capture a window in QTP?

1913


Hi frnds, does anybody know if there is anything called "thin point" or something in qtp? thanks in advance.

1951


How would you export a script from one pc to another in qtp?

1048