dhirendranaga
9 years agoOccasional Contributor
Same lines of code is working for an application in one machine and not working on other machine.
Have two machines with Win7 enterprise version and same version of inhouse desktop application built on WPF and Python.
Using .Net Framework version as 4.5.51209, as checked in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full
Using Testcomplete v11.0644, have a scnerio to select and right-click an item from a ListBox WPFObject. But ClickItemR(x) is working in one machine and not on other. Below is the error displayed.
Possible reasons:
1. The application stopped responding.
2. The application was compiled incorrectly (see the Open Applications topic in the help system).
3. An error occurred in TestComplete.
Technical information:
442 0x80070057 (The parameter is incorrect.)
tcClrHookHelpers11 0
System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to class type 'System.Reflection.MemberInfo'. Instances of types that represent COM components cannot be cast to types that do not represent COM components; however they can be cast to interfaces as long as the underlying COM component supports QueryInterface calls for the IID of the interface.
at SmartBear.TestComplete11.Hook.MarshalHelper.CastIUnknownToMemberInfo(Object obj).
Tested object:
Sys.Process("qzwin", 2).WPFObject("HwndSource: QzFrame0").WPFObject("QzFrame0").WPFObject("Grid", "", 1).WPFObject("QzVL6").WPFObject("QzBorder4").WPFObject("QzHL2").WPFObject("QzBorder3").WPFObject("QzVL5").WPFObject("QzVL4").WPFObject("QzSplitter1").WPFObject("QzVL3").WPFObject("QzSplitter0").WPFObject("QzVL1").WPFObject("QzListBox0")
1. The application stopped responding.
2. The application was compiled incorrectly (see the Open Applications topic in the help system).
3. An error occurred in TestComplete.
Technical information:
442 0x80070057 (The parameter is incorrect.)
tcClrHookHelpers11 0
System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to class type 'System.Reflection.MemberInfo'. Instances of types that represent COM components cannot be cast to types that do not represent COM components; however they can be cast to interfaces as long as the underlying COM component supports QueryInterface calls for the IID of the interface.
at SmartBear.TestComplete11.Hook.MarshalHelper.CastIUnknownToMemberInfo(Object obj).
Tested object:
Sys.Process("qzwin", 2).WPFObject("HwndSource: QzFrame0").WPFObject("QzFrame0").WPFObject("Grid", "", 1).WPFObject("QzVL6").WPFObject("QzBorder4").WPFObject("QzHL2").WPFObject("QzBorder3").WPFObject("QzVL5").WPFObject("QzVL4").WPFObject("QzSplitter1").WPFObject("QzVL3").WPFObject("QzSplitter0").WPFObject("QzVL1").WPFObject("QzListBox0")
Any suggestions please.