Ask a Question

Calling C# dll from testcomplete

SOLVED
lucky_star
Occasional Contributor

Calling C# dll from testcomplete

Hi,

 

#1. Function in C# is:  public static bool check(string _pathFile)

#2. And in TestComplete:

 

var pathFile = "D\\testFile.html";

var res = dotNET["dllName"]["TestHandler"]["check"](pathFile);

 

But the parameter won't work. Appreciate your early help.

 

4 REPLIES 4
karkadil
Valued Contributor

Please read this article

https://support.smartbear.com/testcomplete/docs/testing-with/advanced/using-external-functions/calli...

 

From your example I can see that you miss at least either a namespace or class names. Unfortunately, I don't have a .NET app here to make a better example.

lucky_star
Occasional Contributor

Thanks you so much,

HKosova
SmartBear Alumni (Retired)


@lucky_star wrote:

 

var pathFile = "D\\testFile.html"; 


It should probably be "D:\\testFile.html" with a colon ( : ) after the drive name.


Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
lucky_star
Occasional Contributor

Thanks for your reminder:)

cancel
Showing results for 
Search instead for 
Did you mean: