Haiyangwhu
10 years agoContributor
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:
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
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