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

What is synchronization point in QTP?

0 Answers  


What is recovery scenario manager? When you go for recovery scenario manager?

0 Answers  


What are table and db checkpoints?

0 Answers  


actuall wat my doubt is:while doin regression testin we enter all +ve & -ve data....system has to accept +ve and reject -ve data.in such case we get a popup window sayin that wrong entry...now i wan to overcome this popup window..how do i go further....plz explain.i tried thru rec.scenario but of no use.

1 Answers  


i am new QTP... please tell me automation frameworks , types & for whiich type of applications frameworks are used & how to generate script in keyword driven framework

0 Answers   IBM, TCS,






in QTP we test web based application at that time what script is run? is support vb script? plz tell me

3 Answers  


If already everything is tested using White-Box testing, then what is the need of using Black box testing?

3 Answers  


Can Any One Write How to Write the Script for Child Objects

4 Answers  


Whenever i'm running 3 diffrent scripts in a Test Batch Runner as a batch. its not showing any result. QTP only runs all the scripts n nothing else. B4 running the test batch i have done all the settings, But still its not working.

2 Answers  


Hi. please provide license key for QTP 9.2, I have windows XP on my machine Thanks in Advance, moreshwar

0 Answers  


ACTUALLY I AM WORKING IN THE DISTRIBUTION DOMAIN.MY COMPANY IS PROVIDING DISTRIBUTION SOFTWARE FOR PHARMA AND FMCG DISTRIBUTORS.HERE I AM USING QTP 9.2.HERE IN MY APPLICATION WHILE RECORDING ONE WINDOW APPEARS.IN THAT I CAN SELECT THE ITEM OR NO NEED TO SELECT.BUT WHILE RUNNING THE SAME SCRIPT THE WINDOW MAY NOT APPEAR OR APPEAR.HOW TO WRITE SCRIPT FOR THIS

0 Answers  


What is data driver in qtp?

0 Answers  


Categories