Thursday, November 29, 2012

QTP Object Identification - Part 2

In this video i explained about
1. how QTP identifies object while learning and running
2. where we can configure the property values
3. General points to remember while working with QTP Object Identification.


Sunday, November 4, 2012

QTP Object Identification - An Example

In this video i am demonstrating how as humans we identify any object, because QTP follows the same approach to identify any object in AUT.

Once you understand this example it is easy to understand how QTP identifies the objects.


Saturday, November 3, 2012

How to work with Datatables - Part 2

In this video i will demonstrate the following two concepts:

1. Run configuration - Run on all rows.
2. How to parametrize values using Data - Driver.

How to work with Datatables - Part1

In this video i will demonstrate how to work with Datatables.

Following topics are covered:
How to retrieve a cell value from a Data Table.
How to set a value into a Data Table.
How to import data from an Excel file.
How to export data to an Excel File.
How we can use Excel formulas in Data Table.
What are the general guidelines and few other concepts.


Here is the sample code used in the above video:

'The statement is mandatory to set/get any value, because setCurrentRow is not associated with any row we use GetSheet to make sure that we are pointing to the the right sheet.
Datatable.GetSheet(1)
'GetCurrentRow retrieves the number of rows existing in the Data Table.
RowCount=Datatable.GetRowCount
For i=1 to RowCount
    'setCurrentRow points to the row in a Datatable before we get/set value.
    Datatable.SetCurrentRow(i)
    'Value method is used to get/set value where first parameter is "ColumnName/ColumnId" and the second   parameter is "SheetId/SheetName/dtGlobalSheet"
    ip1=Datatable.Value(1,1)
    ip2=Datatable.Value(2,1)
    Datatable.Value(3,1)=cint(ip1)+cint(ip2)
Next
'Export method exports the data in Excel sheet to the Excel file specified.
Datatable.Export("E:\TempData.xls")