getting name of the DialogBox
I am using Silktest 6.5
I want to capture the Name of the dialogbox.
Please see the below example and related my questions:
[-]window DialogBox D1
[-] StaticText T1
If I use : string s = T1.GetText()
then it gives me the message o/p as - "Hello"
But if I used string s1 = D1.GetText()
then error message appears - Function GetText is not defines for window D1
(My expected o/p is "Message1")
Also pressing dot (.) after D1 gives me the menu list which contains the another option as Caption.
D1.Caption() gives me the same error message.
Please tell me why this happens. How can we know any function is defined for the declared window? How to retrieve the name of the dialog box?
Is there any other method to do above operation?
Re: getting name of the DialogBox
For windows (MoveableWin objects), you should use GetCaption () method or property sCaption.