Page 2 of 2

Re: How to invoke java method

Posted: Thu May 24, 2012 3:05 pm
by Support Team
Hi,

Do you have tried to cast it to a JavaObjectWrapper array or to access one array item by array item?

Regards,
Markus
Ranorex Support Team

Re: How to invoke java method

Posted: Tue May 29, 2012 5:00 pm
by Prad
Hi ,

How can i cast / convert it to an array if the returned object is only a single instance
of the JavaObjectWrapper ,

Regards,
Prad

Re: How to invoke java method

Posted: Wed May 30, 2012 7:17 pm
by Support Team
Hi,

But you wrote the return value is an array of class instances?
Could you describe it more detailed or could you send us a sample which illustrates your problem?

Regards,
Markus
Ranorex Support Team

Re: How to invoke java method

Posted: Mon Jun 04, 2012 3:35 pm
by Prad
Hi ,

This is the error that i encounter when i try to cast the return value to a JavaObjectWrapper array ,

System.InvalidCastException: Unable to cast object of type 'Ranorex.Plugin.JavaObjectWrapper' to type 'Ranorex.Plugin.JavaObjectWrapper[]'.

the situation where i encounter this , i am trying to access an object in a private object that would return the objects in a table and the corresponding sort order

and this this return value indicating that an array is returned , [Lcom.corp.nms.ui.common.generic.table.BaseTableColumn;@5df0733a

but cannot iterate through the elements in the array since the return value is a single instance of the JavaObjectWrapper

please advice

Regards,
Pradeep

Re: How to invoke java method

Posted: Tue Jun 05, 2012 5:06 pm
by Support Team
Hi Prad,

Do your table has a method which return just the elements in your table?
Do you have tried casting it to a normal "JavaObjectWrapper" and then to invoke a method, if there is one, which return just the data of the table, like a getter?
It would help us solving the issue if you can send ([email protected]) or post us the used RxCode and your Java Sample?

Regards,
Markus
Ranorex Support Team