cancel
Showing results for 
Search instead for 
Did you mean: 

clr_bridge System.Threading does not work

SOLVED
Highlighted
Frequent Contributor

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Manager

Re: clr_bridge System.Threading does not work

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.


 

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

2 REPLIES 2
Highlighted
Community Hero

Re: clr_bridge System.Threading does not work

TestComplete automation is not multi-threaded.  It's entirely possible that the reason why this can't work is for that simple reason.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Highlighted
Community Manager

Re: clr_bridge System.Threading does not work

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.


 

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Script Wanted
A new challenge is here!

Create a function to drag one element to another for the TechCorner tag!

Will you dare to take the challenge?


Scripts created in July:
- Passing custom command-line arguments as a test parameter
Top Kudoed Authors