Forum Discussion

Haiyangwhu's avatar
Haiyangwhu
Contributor
10 years ago

TestComplete fails to identify control type during test running

Hi,



I have a function as below:




function WaitDatasetRefresh()


{


    if (Aliases.WaitAliasChild("dlg_Refresh", 5000).Exists)


    {


        WaitDatasetRefreshFinish();  // Check status of dlg_Refresh then close it


    }


}



The function works for a while, however i meet an issue today that inside function WaitDatasetRefreshFinish() it says "Object Aliases.dlg_Refresh does not exist."



Lucky for me that i have a function to dump properties for unexpected windows, and below is the output for property 'Name' of the Refresh dialog:


15 (8): Name = Window("WindowsForms10.Window.8.app.0.3e799b_r13_ad1", "Refresh", 1)



The dialog is a .NET WinForm control, when we object spy the control by using TC, we can see control properties in groups Standard, Extended and .NET. And the name property value is WinFormsObject("DialogTaskProgress").



It looks like TC failed to identify the control type and treated it as a common window control during runtime.



Can someone tell me why this is happening?



Thanks,

Ocean

1 Reply

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)
    Hi Ocean,

     


    Does this recognition issue happen only when executing the test? Can you check how TestComplete recognizes it in the Object Browser window?


    Also, try increasing the value of the Method invoke timeout option. Refer to this article to learn how to do this.