Can a function return a dictionary object?

Answers were Sorted based on User's Feedback



Can a function return a dictionary object?..

Answer / uday kumar _ anem

Yes.

Functions can return a dictonary object.

Dim dicObj
Set dicObj = CreateObject("Scripting.Dictionary")

Set obj=getname
MsgBox(obj.item("name"))


Public Function getname()
dicObj.add "name","Uday Kumar"
Set getname=dicObj
End function

Is This Answer Correct ?    17 Yes 3 No

Can a function return a dictionary object?..

Answer / parag barjatiya

Public Sub GetValue()
Set obj = getname
MsgBox (obj.Item("name"))
End Sub

Public Function getname()
Dim dicObj
Set dicObj = CreateObject("Scripting.Dictionary")
dicObj.Add "name", "Uday Kumar"
Set getname = dicObj
End Function

Is This Answer Correct ?    6 Yes 0 No

Post New Answer

More QTP Interview Questions

Is there any thing that we can replace recovery scenario manager in QTP.

3 Answers  


How do I modify a value of an elemnt which is not the first one in xml file? My sample XML file is like: <Environment> <Variable> <Name>Name</Name> <Value>Uday Kumar</Value> </Variable> <Variable> <Name>Designation</Name> <Value>Senior Software Engineer</Value> </Variable> </Environment> for example, I'd like to change the value 'Senior Software Engineer' to 'Student' in the second element. How do I do it in QTP?

3 Answers   QualiTest,


How to associate shared object repository to test in qtp?

0 Answers  


what is the use of automation frame work ??(QTP)

2 Answers  


How QTP recognizes Objects in AUT?

1 Answers   Crea,






What is Object Spy?

7 Answers   JKH, Ordain Solutions,


Our company is having a windows client server application developed in vb.net. so there is a treeview and i am not in a position to record the click events in QTP. so kindly help. Vivek

0 Answers  


How to access values from Unix OS and how to write..

1 Answers  


how u will evaluate the tool for test automation?

0 Answers   SysArc,


What is the limitation to XML Checkpoints?

1 Answers  


Can I do Game testing with QTP tool

1 Answers   Google,


What do you to script when objects are removed from application?

0 Answers  


Categories