Monday, January 14, 2013

About Dictionary Object

Folks,

Here is some informaiton about Dictionary Object.
  • Dictionary object stores name/value pairs in an array.
  • It has property like count, item, compare mode,key etc
  • It has method like add, exist, keys,items , remove, removealletc.
  • It has event like initialize
example,
dim beers
set beers = createobject("scripting,dictionary")
beers.Add "a","val1"
beers.Add "b","val2"
msgbox ("value of b" &beers.item("b"))

Advantages
> can be use as global variable declaration, so that any test can access the values from it in the run time
> you can store and retrieve any number of run time values into dictionary
> it is one of the parameterization technique in QTP

Disadvantages
We can not specify the values in design time like datatable environment variable action parameter
So it is useful only run time not design time

Thanks,
Trupti

No comments:

Post a Comment