LeanFT: Unable to invoke methods with non-primitive parameter: No object is registered with cookie: [object Object]

0

I'm trying to invoke a method on a NativeObject, e.g.:

nativeObject.invokeMethod("scrollRectToVisible", new DynamicObjectProxy(new Rectangle()));

I came up with the idea to pass a DynamicObjectProxy as a method parameter as the "invokeMethod"-method of a NativeObject always returns a DynamicObjectProxy for non-primitive return types.
However, the following exception arrises:
com.hp.lft.sdk.GeneralLeanFtException: no object is registered with cookie:[object Object]

Invoking methods with primitive parameters works fine. If I pass the real object as a parameter, e.g.:

nativeObject.invokeMethod("scrollToRectVisible", new Rectangle());

The following exception arrises:

com.hp.lft.sdk.GeneralLeanFtException: Typeconflict (HRESULT: 0x80020005 (DISP_E_TYPEMISMATCH))

I would highly appreciate any suggestions.

java
testing
hp-uft
leanft
asked on Stack Overflow Sep 12, 2018 by Ubuntix

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0