Forum Discussion

Petewilson's avatar
Petewilson
Contributor
6 years ago
Solved

Test Complete: Undeclared identifier: Name error in ddt loop but never in first loop

I am fairly new to Test Complete so please bear with me in my explaination and let me know if i need to provide any more detail to help resolve.   I have a scipt that enters a web page controls i...
  • tristaanogre's avatar
    6 years ago

    Have you considered, rather than using a for loop to iterate through the objects to find the desired control, to use FindChild off of the ParentWindow object?

     

    https://support.smartbear.com/testcomplete/docs/reference/test-objects/members/common-for-all/findchild-method.html

     

    When you do so, don't use the "Name" property in the search.  What you have as the "ControlName" should actually be a value of a property on the object itself.  Also, instead of "VisibileOnScreen" after you do the search, use "Exists" and raise an error if it cannot find the object.