Posts

Showing posts with the label Dictionary Object

Dictionary Object in QTP

Dictionary object is similar to a typical array. The difference between a dictionary object and an array is that there is a unique key associated with every item of dictionary object. This unique key can help you in calling that item as and whenever required. In arrays we store the values based upon the index i.e. 0,1,2 but here we can store the values based upon the names i.e. keys. Each value is stored corresponding to the unique keys. Dictionary object that stores data in key, item pairs. Dictionary objects are very useful when dealing with the large no of data. On an average they are 3 times faster then the collection objects Every key should be unique. Duplicate keys are not allowed. Dictionary object belong to "Scripting.Dictionary" class. To create a dictionary object we can use the following statement: REM Create a variable. Dim objDict REM Create dictionary object Set objDict=CreateObject("Scripting.Dictionary") Following are the methods availa...