What is dictionary object? what is the use of it? How you will display all the items in the dictionary object?



What is dictionary object? what is the use of it? How you will display all the items in the dictiona..

Answer / pushkar1206

Dictionary object is similar to array to store variable value with key. To share data in different actions in a test, we can use dictionary object. In DO, we are not restricted to use keys as numeric similar to array.

Fetch all items:

Set obj=createobject("scripting.dictionary")
obj.Add "company","india"
obj.Add "company2","USA"
For each i in obj
msgbox obj.item(i)
Next

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

I encountered with very strange problem in qtp while writing the script i written the code window"regexpwndclass:=XLMAIN").window"regexpwndtitle:=Open" ).Exit this code was working fine for about 10-15 times i executed the script but after some time qtp started giving the error with the same code the error is "Object doesnt support this method or function window(...).window(..)" then i modified the code with only window"regexpwndtitle:=Open").Exit in place of window"regexpwndclass:=XLMAIN").window"regexpwndtitle:=Open" ).Exit now again its working fine i cannot understand what thing is creating the problem if same code executed successfully in starting for about 10 times then why it is giving the error now can anyone give the reason .

0 Answers  


how i can delete the excel process for the task manager using QTP

2 Answers  


tell me about regular expressions in QTP? where we use? give eample?

2 Answers   IBM,


hai friends i already ask this question but when i post the question the alignment goes wrong .....my question is we have a WEB TABLE ....assume that web table having 3 row's and 3 column here in 2nd row 3rd column having VISIT FACEBOOK link...now i want to check the VISIT FACEBOOK link is available or not ..if it's there i want to click the link ...then how to find the web table row or column count ....don't write the excel or data table script here friends .....consider that it's a WEB TABLE do a favour ...thank's

3 Answers  


How to check bitmap output value?

0 Answers  






What are the types of Object Repositories in QTP?

9 Answers  


Hi, i am mallishwari, i am veryn ew to testing but i have very much interest in testing. plse give me some guidence to get the job in testing. send me required documents and faqs to my personal id: mallishwari_urs@yahoo.co.in thans for advance.

2 Answers  


What is the concept of hooking in QTP?

1 Answers  


what is defination of system testing?

3 Answers   CodeArrow, Infosys, Omax,


Connect to QC using AOM.

0 Answers   Deloitte,


Plz explain about object propeties in object identification? means.. explain about 1. mandatory properties.2. assestive properties 3. ordinal properties.

3 Answers   TCS,


Anybody can tell me what are the common roles and responsibilites of a Automation Test engineer

2 Answers   IBM,


Categories