QTP @ Dictionary Object >> Keys
QTP @ Dictionary Object >> Keys
0 '##############################################
0 ' Dictionary Object >> Keys
0 '##############################################
0 Print "##############################################"
0 Print " Dictionary Object >> Keys"
0 Print "##############################################"
0 'Keys
0 Call DictKeysDemo()
0 Print DictKeysDemo()
0 MsgBox DictKeysDemo()
0 Function DictKeysDemo()
0 ' Dim a, oDict, i ' Create some variables.
0 Set oDict = CreateObject("Scripting.Dictionary")
0 oDict.Add "Subject", "QuickTestQTP" ' Add some keys and items.
0 oDict.Add "Teacher", "GAReddy"
0 oDict.Add "Learner1", "SomeBody"
0 oDict.Add "Learner2", "SomeBodyElse"
0 a = oDict.Keys ' Get the keys.
0 For i = 0 To oDict.Count -1 ' Iterate the array.
0 s = s & a(i) & vbNewLine ' Return results.
0 Next
0 DictKeysDemo = s
0 End Function
0 comments:
Post a Comment