RE: Script problems after upgrading the application from vb6 to .net 3.5
The biggest problem I have it that I click 1 control and the I click it again test complete reports that the control is destroyed.
Can you zip the entire project suite directory and send it to us? Can you reproduce the problem on the sample application attached to your initial post or on some of our sample applications (<All Users>\Documents\TestComplete 7 Samples\Open Apps\OrdersDemo)?
Other problem I have is that the attached code does not work.
In code line 16, the WaitWinFormsObject method is called with two parameters, so its first parameter specifies the native name of an object. Since the needed object does not have a native name (its NativeClrObject.Name property's value is empty), WaitWinFormsObject does not find it.
I suggest that you try calling WaitWinFormsObject with three parameters - TestObj.WaitWinFormsObject(ClassName, WndCaption, Timeout). For details, see the "WaitWinFormsObject Method" help topic.
While the second script runs every time.
The Test2 routine uses objects' mapped names, while the combo box's parents are mapped by the "NativeClrObject.Name" property or by the "ClrFullClassName" and "WndCaption" properties - in both cases, the mapping criteria are sufficient, so the routine works properly.
------ Yuri TestComplete Customer Care Engineer
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️