Hi, my test application use Janus control system as the main menu. So I use UICtrlsMainMenu to access the main menu. Usually it works fine. But sometimes my automation scripts can't open file, I checked the log, and found this error information "unable to find the object "UICtrlsMainMenu". I have use the following code
for i = 1 to GlobalConfig.TIME_OUT
if (BuiltIn.IsSupported(Aliases.MainWnd, "UICtrlsMainMenu")) then
CheckMainMenu = true
'Log.Message("Wait mainmenu available in i= " & Cstr(i))
to ensure UICtrlsMainMenu exist.
If I restart my computer, the issuce can be resolved. But it's possible that the issue will occur again.
We were unable to reproduce the problem on our side with TestComplete 6.51. If you are using an earlier version, please update to the latest one (v. 6.51) and check whether the problem persists. If it does, a possible cause of the problem is that the problematic window is recreated, and the reference TestComplete uses to work with the window object becomes invalid. Please try using the following script with the "<Janus Systems>\Controls for Microsoft .NET\Windows Forms Controls v3\Demos\Janus.NorthwindDemo.exe" application shipped along with the controls (create the corresponding Name Mapping scheme):
<font class="small">Code:</font><hr /><pre>' VBScript
If WaitMenu() Then
WaitMenu = false
for i = 1 to 100
if (BuiltIn.IsSupported(Aliases.Main, "UICtrlsMainMenu")) then
WaitMenu = true
If the script works fine with the sample application on your machine, try using it with your application and let me know your results.