Forum Discussion
- Philip_BairdCommunity ExpertHi Minh, the article you linked to indicates you are trying to execute the code in a C# application.
If so, you cannot use eval(), it is a function specific to JScript.
Regards,
Phil Baird - Philip_BairdCommunity ExpertHi Minh, I have had some experience with the COM Object writing a batch execution util and I don't think it provides the feature you want.
From experience, the COM Object provides methods to execute existing Test Items within a Project Suite, e.g.
but nothing to allow the execution of adhoc, anonymous code.
The closest thing I can think of is the ItcIntegration::RunRoutineEx() method which allows execution of a function with parameters.
Regards,
Phil Baird - Hi Minh,
As far as I know there are external libraries where the Eval function for C# is implemented. You can google it.
For example, I've found this one.
- minhterryContributorThanks all for your reply, but my problem is still there. So i would to run a test complete script from my window C# application, i would like to enter script there and just click run to execute. So any suggest ?
Thank you for advance - Philip_BairdCommunity ExpertHi Minh, in what way are you wanting to run a test complete script from your windows C# application
1. By it's name?
2. As a string containing the script source code?
Regards,
Phil Baird - minhterryContributorHello Phil Baird,
Yes, option 2 : As a string containing the script source code?
I would like to execute a string containing script from C# , that work with Testcomplete via Com.
If you have any idea, please share with me.
--
Thanks all for your help,
MinhT - minhterryContributorThanks for your help.