Forum Discussion
Hi,
I am facing a similar problem with String Array in JavaScript.
I am trying to pass a String array to a parameter but it always falis with Type Mismatch error.
Below is the JavaSript code that I am using.
dotNET.<dll>.<class1>.GetInstance.<field> = ["/INI=C:\\Temp\\Text.txt"];
the <field> above is expecting a DotNet String array but it is not accepting JavaScript array. is there a way to cast JS array to dotNet array.
Thanks,
Yusuf
Hi Yusuf,
Try the advice by HKosova from here: https://community.smartbear.com/t5/TestComplete-Functional-Web/Working-with-array-in-dotNET/m-p/89156/highlight/true#M21604
> dotNET.<dll>.<class1>.GetInstance.<field> = ["/INI=C:\\Temp\\Text.txt"];
Also, I am not sure about .GetInstance() call - maybe you first must create an instance of the object by calling its constructor (one of .zctor() methods) and work with the property of the created instance.
Related Content
- 7 years ago
- 13 years ago
- 7 years ago
Recent Discussions
- 10 hours ago