cancel
Showing results for 
Search instead for 
Did you mean: 

How to send custom params to "Native" methods

Highlighted
Visitor

How to send custom params to "Native" methods

Application: Java Swing

Language: Java

Tool: TestLeft 4.20 jar

I have obtained a Native method of my application (say "DoCrazyStuff") which takes an argument of type CrazyData.

 

Now, when I call this method as

CrazyData cd = new CrazyData();

CrazyBean.callMethod(TestObject.class,"DoCrazyStuff", cd);

I get an InvocationException with the following message

com.smartbear.testleft._internal.webclient.WebApiException: Failed to parse the value '{"abc":"ABC","xyz":"XYZ","123":"345"}' of the arg1 parameter: Unable to convert JSON to an object. The JSON structure does not contain an object ID..

I know I am doing something wrong, but unable to figure it out. Any help will be appreciated.