Forum Discussion

Ivg's avatar
Ivg
Occasional Contributor
8 years ago

Passing "IObject" as an argument to native method fails

Hi,

 

I'm trying to do some actions on native java methods and fails while trying to pass an IObject interface (actually java object) as a parameter.

 

 IControl table = *Finds the table...*

 

IObject cellRectangle = table.CallMethod<IObject>("getCellRect", rowIndex, columnIndex, true);

 

table.CallMethod("scrollRectToVisible", cellRectangle);

 

 

The last line is where I get the exception, when trying to pass cellRectangle as an argument.

 

Doesn't TestLeft supports passing IObject as an argument to native methods?

 

Thanks

  • Hi Ivg,

     

    Passing IObjects to native methods is now possible in TestLeft 2.3.

  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)

    Hi Ivg,

     

    Passing IObjects to native methods is now possible in TestLeft 2.3.

  • Ivg's avatar
    Ivg
    Occasional Contributor

    The exception I got:

     

    An unhandled exception of type 'SmartBear.TestLeft.TestObjects.InvocationException' occurred in SmartBear.TestLeft.dll

    Additional information: Failed to parse the value '{"objectId":"e45a6c71-b84b-42da-8a05-64c414a48d5b"}' of the arg1 parameter: Exception: Unable to convert JSON to an object. The JSON structure does not contain an object ID..