Page 1 of 1

unable to cast

Posted: Mon Aug 01, 2011 7:32 am
by sbaheti
Hi,
I want to identify the tree item ,

The rx path for the tree item is
/form[@processname='EXCEL']/element[@class='EXCEL2' and @instance='2']/container[@caption='eGlue System Data Objects']/element/element/container/element/element/element/element/container/element/element/tree/treeitem[1]/button[@automationid='Expander']

I am getting the message like this
Unable to cast object of type 'Ranorex.Libs.WinForms.InvokeResult' to type 'Ranorex.Libs.WinForms.ControlProxy'.

if this message is not thrown ...it doesnt identify the control.Pls help me to solve this...Very urgent..

Thanks,
sonali.

Re: unable to cast

Posted: Tue Aug 02, 2011 10:19 am
by Support Team
Hi,
sbaheti wrote:if this message is not thrown ...it doesnt identify the control
It is only possible to find this element if this warning is thrown? Did you check the RxPath with Ranorex Spy?
You are using WPF inside the Excel Application right?

Please answer me also a few additional questions:
  • Which version of Ranorex is in use?
  • Does this error occur always on the same code part or on different places?
  • Would it be possible to post us the code snippet, where the code causes this warning
  • Which operating system do you have?
  • Are you working on a x86 or x64 system?
Thanks in advance.

Regards,
Peter
Ranorex Team

Re: unable to cast

Posted: Thu Aug 04, 2011 6:19 am
by sbaheti
Hi,
1.using Ranorex 3.0.1 Version,
2.yes,The error occur at the same place.Actually i has to run some series of test cases and that control is the entry point for all the test cases(I mean all the test cases should identify the control ).when i run some test case doesnt identify and some test case identifying that one.
3. Windows 7
4.x86 system i am using

those controls are wpf controls hosted in vsto control into excel application.Actuallly that is an addin to excel.
sorry we cant provide the code.Pls do the need ful asap. :(

Thanks ,
Sonali.

Re: unable to cast

Posted: Fri Aug 05, 2011 8:00 am
by Support Team
Hi,

Please update to Ranorex 3.0.5 and try it again. We fixed a lot of bugs with this version.
http://www.ranorex.com/download/Ranorex-3.0.5.exe
sbaheti wrote:sorry we cant provide the code.Pls do the need ful asap.
Without a code snippet it is hard to find out what's going wrong. Are you sure it is not possible to post or send me the code snippet of the place where this error always occur?
You can send it to [email protected]

Regards,
Peter
Ranorex Team