Recent Post

QTP @ Dictionary Object >> KeyExists

QTP @ Dictionary Object >> KeyExists

QTP @ Dictionary Object >> KeyExists

0        '##############################################
0        ' Dictionary Object >> KeyExistsDemo
0        '##############################################
0        Print "##############################################"
0        Print " Dictionary Object >> KeyExistsDemo"
0        Print "##############################################"
0        Function KeyExistsDemo()
0        '   Dim oDict, msg   ' 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           If oDict.Exists(" Learner2 ") Then
0              msg = "Specified key exists."
0           Else
0              msg = "Specified key doesn't exist."
0           End If
0           KeyExistsDemo = msg
0        End Function

0 comments:

Post a Comment

GAReddy @ OneTestingCenter @ All Articles