Forum Discussion

Preetha's avatar
Preetha
Occasional Contributor
6 years ago
Solved

Not able to handle dynamic object in desktop application

Not able to handle dynamic objects Trying to identify objects the in popup. wanted to click on the ok button in the popup.   using the below script to find the children of the window... but it ...
  • tristaanogre's avatar
    6 years ago

    Based upon your screenshot, note that the ChildCount of the window that you have designated is "zero".  This means that there are no recognized child objects so FindAllChildren won't find anything.  This tells me that a) the window you are highlighting is not, technically, the parent of the buttons you are trying to find or b) that the buttons you are trying to find are contained in some sort of object that is not exposed to TestComplete.

    What happens when you try using Object Spy on the OK button itself, just as an investigation tool to determine where it lands in your hierarchy so you can properly look for it.

     

    Item of note... you are using NameMapping based upon the screenshot (MappedName property is non blank) so some of the first lines of your code can be restructured to use that Alias rather than the name value of Sys.Process.blahblahblah...