Ask a Question

Script problems after upgrading the application from vb6 to .net 3.5

jewe
Occasional Contributor

Script problems after upgrading the application from vb6 to .net 3.5

Hi,



After upgrading our code to vb.net 3.5 platform I am encountering some problems

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.

But the window is still there as wel as the control, a combobox.



Other problem I have is that the attached code does not work.

I inserted a test program in the zip file.

The script should 3 items, when using this method one of the childeren is not found.

While the second script runs every time.

My problem is that I can not map everything, some of the scripts are general made so I can re-use them for several controls.



Any help is welcome.



Best regards,



Jeffrey
1 REPLY 1
YMinaev
Staff

Hi Jeffrey,



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. ⬇️⬇️⬇️
cancel
Showing results for 
Search instead for 
Did you mean: