• Home
  • Testing
  • SAP
  • Web
  • Must Learn!
  • Big Data
  • Live Projects
  • Blog

What is Ordinal Identifier?

If mandatory and assistive properties are insufficient to identify an object during a record session, QTP uses Ordinal Identifier in addition to other captured properties to identify the objects during a record session. By default, an ordinal identifier type exists for each test object class.

In the Object Identification Window, you can modify the default Ordinal Identifier for an Object

Ordinal Identifier in QTP: Complete Tutorial

There three types of Ordinal Identifiers in HP UFT.

  1. Index based
  2. Location based
  3. Creation Time

Index Based

  • When using Index based ordinal identifier, while recording, QTP will assign a value to INDEX property of an object
  • The value is based on the order in which the object appears within the source code.
  • The first occurrence has value 0
  • Index property values are object-specific.
  • Therefore, if you use Index:=3 to describe a WebEdit test object, Quick Test searches for the fourth WebEdit object on the page.
  • Likewise, you use Index:=1 to describe a WebButton test object, Quick Test searches for the second WebButton object on the page

Location Based

  • When using location based ordinal identifier, while recording, Micro Focus UFT will assign a value to LOCATION property of an object to uniquely identify the object.
  • The value is based on the order in which the object appears within the window, frame, or dialog box, in relation to other objects with identical properties.
  • The first occurrence of the object is 0.
  • Values are assigned in columns from top to bottom and left to right.

Creation Time

  • When using the creation time ordinal identifier, while recording, QTP will assign a value to Creation Time property of a Web Browser
  • The Identifier is only available for the Web Environment
  • This value indicates the order in which the browser was opened relative to other open browsers.
  • The first browser that opens while recording receives the value CreationTime=0 and succeeding browsers are given values 1, 2, 3 ... and so on

Please be patient. The Video will load in some time. If you still face issue viewing video click here

Resources

Download the Webpages used in the above tutorial for self - practise