Navigating the Test Composition object hierarchy.

Your Script can traverse the object hierarchy of the Test Composition to find the items in the Test Composition, such as Messages or Browser Actions that have completed prior to Script play. The Test Composition is at the top level. It contains Bands, which contain Tracks, which contain Test Clips, which contain all other items.

For example, the following statement retrieves the item in the Test Clip that precedes the current Script:

var priorItem = $context.currentItem.previousItem;

Properties of $context useful for navigating the object hierarchy include:

  • currentItem
  • currentBand
  • currentTrack
  • currentClip
  • currentChain
  • currentMessage
  • currentBrowserAction
  • currentScript
  • currentTarget

Properties of items in the object hierarchy useful for navigation include::

  • parent
  • children
  • nextItem
  • previousItem
  • name
  • type

Refer to the Scripting documentation for more information.