InvokeRemotely Error : Automation API

InvokeRemotely Error

Class library usage, coding and language questions.

InvokeRemotely Error

Postby atom » Fri Jun 17, 2011 1:02 pm

Hiya

Im automating a Dev Express XtraGrid
When the grid is displayed in the AUT, a background thread is kicked off to populate it
From automation point of view I have to wait for this background thread (which is loading from a database) to finish. So what i did was write a delegate method to invoke remotely, that simply loops waiting for no more rows. However when i call this method i get this error:

Ranorex.ActionFailedException: Action 'invokeremotely' failed on element '{Unknown:fTradeGrid}'. ---> System.InvalidOperationException: The control does no longer exist. at Ranorex.Plugin.WinFormsFlavorElement.InvokeMethod(BindingFlags flags, String name, Object[] args) at Ranorex.Plugin.WinFormsFlavorElement.InvokeRemotely(RemotelyInvokedDelegate deleg, Object inputData) at Ranorex.Plugin.WinFormsFlavorElement.InvokeAction(Element element, String name, Object[] args) at Ranorex.Core.Element.InvokeAction(String name, Object[] args) --- End of inner exception stack trace --- at Ranorex.Core.Element.InvokeAction(String name, Object[] args) at Ranorex.Control.InvokeRemotely(RemotelyInvokedDelegate deleg, Object inputData) at SophisGUIAutoRanorex.Controls.Grid.DevExpress.DEXtraGrid.WaitForNoMoreRows(Int32 TimeOutSecs)

The control does definitely exist because I invoked remotely another method on it prior to this one.

Any clues?
atom
 
Posts: 339
Joined: Mon Dec 08, 2008 12:14 am
Location: Dublin, Ireland

Re: InvokeRemotely Error

Postby atom » Fri Jun 17, 2011 1:09 pm

Infact my delegate creates a log file, and it was called - but seems ranorex somehow lost a reference to it
atom
 
Posts: 339
Joined: Mon Dec 08, 2008 12:14 am
Location: Dublin, Ireland

Re: InvokeRemotely Error

Postby Support Team » Fri Jun 17, 2011 4:13 pm

Which Ranorex version do you use?

atom wrote:System.InvalidOperationException: The control does no longer exist.

With older Ranorex versions (prior 3.X), Ranorex would also issue that message if the control does not return a value to the InvokeRemotely call within 2 seconds. With Ranorex 3.X the Control.InvokeRemotely method now supports a timeout argument allowing to change the 2 seconds value.

Instead of waiting in the InvokeRemotely call, you can loop the InvokeRemotely call itself as a workaround.

Regards,
Alex
Ranorex Team
User avatar
Support Team
Site Admin
 
Posts: 4845
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Re: InvokeRemotely Error

Postby atom » Mon Jun 20, 2011 10:17 am

Ok thanks, am using 2.2 version
atom
 
Posts: 339
Joined: Mon Dec 08, 2008 12:14 am
Location: Dublin, Ireland


Return to Automation API

Who is online

Users browsing this forum: No registered users and 0 guests