clr_bridge System.Threading does not work
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 Yatskovskaya
SmartBear Community and Education Manager
