Object that stores data key, item pairs. Each item is associated withQTP-dictionary-object a unique key. The key is used to retrieve an individual item and is usually a integer or a string, but can be anything except an array.

Methods of Dictionary Object –

  1. Add Method – Adds a key and item pair to a Dictionary object.
  2. Exists Method – Returns true if a specified key exists in the Dictionary object, false if it does not.
  3. Items Method – Returns an array containing all the items in a Dictionary object.
  4. Keys Method – Returns an array containing all existing keys in a Dictionary object.
  5. Remove Method – Removes a key, item pair from a Dictionary object.
  6. RemoveAll Method – The RemoveAll method removes all key, item pairs from a Dictionary object.

Properties of Dictionary object –

  1. Count Property – Returns the number of items in a collection or Dictionary object.
  2. Item Property – Sets or returns an item for a specified key in a Dictionary object. For collections, returns an item based on the specified key.
  3. Key Property – Sets a key in a Dictionary object.

Additional Reading

Dictionary Object in QTP. A complete guide

If you want to keep track of further articles on UFT (QTP). I recommend you to subscribe by Email and have new UFT articles sent directly to your inbox.

Subscribe to get free updates on UFT!

LearnQTP is the most popular site on UFT (formerly QTP).

Enter your first name and email address below to instantly subscribe and download an eBook on Optimizing UFT Scripts. In future, we will make sure you get new tips & tricks on UFT delivered direct to your email box.

Please check your email and confirm free subscription!