clr_bridge System.Threading does not work
Hello,
I have added the CLR Bridge System.Threading and want to call the function ManualResetEvent, but it keeps saying "RuntimeError: The specified object is not callable."
Here is the code i run:
EventTestComplete = dotNET.System_Threading.ManualResetEvent(False)
The code works in normal pycharm call with
from System.Threading import ManualResetEvent, Timeout, Thread EventTestComplete = ManualResetEvent(False)
Any ideas why this error pops up in Testcomplete all the time, but works in pycharm?
Hi Dominik,
I see that you have contacted the Support Team on this issue. Let me quote their reply here:
Support Team wrote:
Thank you for reaching out to us. TestComplete adds a special method for .NET class constructors, zctor - see the "Calling Functions From .NET Assemblies" article for more details. Thus, the object should be created like this:
EventTestComplete = dotNET.System_Threading.ManualResetEvent.zctor(False)
Please also note that TestComplete does not support multithreaded scripts, so porting code from PyCharm might not work if it involves multithreading.