QTP Steps
This document is created to provide a simple guide on steps for performing certain operations in QTP, this does not provide a discussion of 'why', it simply shows 'how'
CREATING AN OBJECT REPOSITORY
[Method 1]
1. Open a new test
2. Open the object repository by clicking 'Tools->Object Repository'
3. Click the 'Add New Object' button
4. Click the object in your application that you want to introduce into the object repository
[Repeat 4 for all the objects you want to store. Note that by clicking on the header of a container, QTP can learn all the objects in the window]
5. Click the 'Export' button
6. Type in the name of a file in the dialog window that appears
[This will save a file on your harddrive with a TSR extension. This is your shared object repository]
[Method 2]
1. Open a new test
2. Open the Resources tab by clicking 'Test->Settings->Resources'
3. Specify 'shared' as the object repository type.
4. Type in the name you want to give your object repository in the available field
[You must specify a filename that does not exist, and you must include the .tsr extension]
5. Close this window by clicking OK
6. Open the object repository by clicking 'Tools->Object Repository'
7. Click the 'Add New Object' button
8. Click the object in your application that you want to introduce into the object repository
[Repeat 8 for all the objects you want to store. Note that by clicking on the header of a container, QTP can learn all the objects in the window]
9. Click the 'Save' button
USING AN OBJECT REPOSITORY FILE
Before you begin, you must know the following
a. The location, and name of your object repository file.
1. Open a new test
2. Open the Resources tab by clicking 'Test->Settings->Resources'
3. Specify 'shared' as the object repository type.
4. Click the ellipsis to bring up the 'File Open' dialog. Search for your object repository file. Choose it, and click okay.
[IMPORTANT: Choose the file instead of typing in the name, this will ensure that you select a file name that already exists]
5. Close this window by clicking OK
6. Start recording, editing...
CREATING AN ODBC DATASOURCE
Before you begin, you must know the following
a. The type of datasource you want File, System or User
b. The type of database that you want to connect to
c. The connection details for connecting to the database
[Microsoft Access]
1. Bring up the system's Control Panel
2. Choose 'Administrative Tools->Data Sources (ODBC)'
3. Choose File, System or User DSN tab
4. Click the 'Add' button
5. Choose the appropriate driver for the database you have in mind
[For Access, this would be Microsoft Access Drive (*.mdb)]
6. Click Next
7. In the DataSource dialog, do the following
Type in the DatasourceName
Click Select and choose the file from the file system,
Optionally type in a description
Click Finish to dismiss this dialog
[You will now see the DSN in the list of DSNs on the machine]
8. Clicking Ok to close the ODBC tool.
Specify Object Repository
-----------
1. Open a new test [File->New->Test]
2. Open the Test Settings dialog [Test->Settings->Resources]
3. Select shared
4. Click on the ellipsis
5. Choose your object repository [.tsr] from the file system
Checkpoints
-----------
1. Begin Recording [Test->Record]
2. Select Checkpoint [Insert->Checkpoint]
3. Select Object
4. Specify Checkpoint details
5. Stop Recording [Test->Stop]
Output Value
-----------
1. Begin Recording [Test->Record]
2. Select Output Value [Insert->Output Value]
3. Select Object
4. Specify Output Value details
5. Specify DatatTable column
6. Stop Recording [Test->Stop]
Data Parameterization
---------------------
1. Open the Data Driver Wizard [Tools->Data Driver]
2. Click on the item to parameterize
3. Click the Parametrize button
4. Choose step-by-step parameterization
5. Click Next
6. Click the Modify Parameters icon if you want to change the data table column. Type in the Name, click Ok.
7. Click Finish
8. Repeat steps 2 to 7 for each value you want to parameterize.
Synchronization Point
---------------------
1. Select Synchronization Point [Insert->Output Value]
2. Select Object
3. Specify Synchronization Point details
[Details include:
object: The object you are waiting for
Property: The specific property of this object that you are waiting for
Value: The value you expect the property to get
Timeout: The maximum amount of time your are willing wait for the event to occur
]
<< Home