What is a Dictionary object in QTP.?



What is a Dictionary object in QTP.?..

Answer / manjunathareddy

Dictionary object is similar to a typical array,
it uses unique key associated with every item,it helps you
call the item whenever required.

Example:-
Dim Dict
Set Dict=CreateObject("Scripting.Dictionary")
Dict.Add "A","Apple"
Dict.Add "B","Banana"
i=Dict.Items
j=Dict.Keys

For k= 0 to Dict.Count - 1
Msgbox j(k)&": "&i(k)
Next

Is This Answer Correct ?    6 Yes 1 No

Post New Answer

More QTP Interview Questions

take one exmple and write on that discriptive programe in qtp?

1 Answers  


Write a QTP script to enter a keyword in to Google search engine?

0 Answers   Wells Fargo,


after initiating one project for testing, when exacltly QTP tester role starts?

0 Answers  


If the objects hierarchy is changing from build to build, then how you will handle that condition?

0 Answers  


How to Close all browsers in reverse order.

3 Answers   Marlabs,






How to switch between browser tabs? )moving from one tab to another tab)

1 Answers   CTS,


We need to verify the user name & password in for the user validation. But we don't want to use the parameterization/ loop for user name and password. What is the way in scripting so that user & password will generate automatically.

11 Answers   Tech Mahindra,


I am facing an issue of object identification with the dropdown element of DHTML grid. When I tried to recognize these different dropdown objects, QTP identifies only one object for all the dropdowns. Hence, selection of different data from different dropdowns list is an issue. To overcome this problem, i have used Descriptive Programming technique by creating different object descriptions which have all the other properties same but differ only in one property i.e. ‘X’ location of the element on the screen. Hence, i have created distinct object descriptions that would allow us to select values in different dropdowns. The code is given below. But still I am unable to identify distinct dropdown objects. ‘Object Description for Dropdown Cell Status Set objCellStatus = Description.Create objCellStatus("micclass").value = "WebList" objCellStatus("name").value = "select" objCellStatus("x").value = 219 ------ ‘X’ Axis value for cell status drop down ‘Object Description for Dropdown Sub Segment Set objSubSegment = Description.Create objSubSegment("micclass").value = "WebList" objSubSegment("name").value = "select" objSubSegment("x").value = "319" ------ ‘X’ Axis value for sub segment drop down Please help... This is specific to DTML grid(Drop down object)

0 Answers  


what all are the coverages , explain ?

2 Answers  


can i compare two databases using QTP ?

0 Answers  


if we can find the status of script in qtp that either it's pass or fail then why we need to put this status on different excel file or log file in hybrid framework .please let me know asap thanks

1 Answers   iCreate,


How to capture screenshots of Exceptions/Errors during run- time?

12 Answers   Ordain Solutions,


Categories