Forum Discussion

geethwind's avatar
geethwind
Contributor
13 years ago

How to get Window caption in Test complete

Is there anyway , i can get the window caption and the corresponding window object ? how to check the window exists or not?  before getting its caption or parent ?



i am using like




strTemp = NameMapping.Sys.Process("iexplore").IEFRame(0).GetWndCaption



i am getting the error "The object with the specified attributes does not exist" , can anyone help me how to use these property functions to extract the values of the object?



set winObj = NameMapping.Sys.Process("iexplore", 2).IEFRame(0).GetParent



Thanks


..Process("iexplore").IEFRame(0).GetWndCaptioni am getting the error "The object with the specified attributes does not exist" , can anyone help me how to use these property functions to extract the values of the object?..Process("iexplore", 2).IEFRame(0).GetParentThanks




1 Reply

  • Hi,




    Is there anyway , i can get the window caption and the corresponding window object ?


    To get the window caption, you can use the WndCaption property.




    how to check the window exists or not?


    Please read Checking Whether an Object Exists in the online documentation.


    As for your script, it looks like the problem is that you address test objects incorrectly. To know how to address test objects and what methods and properties are provided for the objects, you can explore your application in the Object Browser panel. For more information, please read the Object Browser Overview and Naming Objects online articles.