I have this simple code:
[STAThread]
public static int Main(string[] args)
{
PluginManager.Instance.LoadDefaultPlugins();
Ranorex.Core.Element el = "/form[@controlname='MainForm']/element[@controlname='ribbon']";
Ranorex.Control ctrl = new Control(el);
ctrl.Click();
string value = (string)ctrl.InvokeRemotely(getSynchronisedRibbonObject);
return 0;
}
static object getSynchronisedRibbonObject(System.Windows.Forms.Control control, object inputData)
{
return "Test";
}
What I get is:
Ranorex.ActionFailedException: Action 'invokeremotely' failed on element '{Unknown:ribbon}'. ---> System.InvalidOperationException: The control does no longer exist.
at Ranorex.Core.Element.InvokeAction
at Ranorex.Control.InvokeRemotely
at Ranorex.Control.InvokeRemotely
The control does indeed exist, as I click it before doing the invokeRemotely call. Can anyone see where I'm going wrong here?
Invoke Remotely Failure
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Are you starting your testing application from a network share or another location with limited security? The DLLs/EXEs that contain the delegates which should be called remotely need to reside in a location with full trust.
You can either copy your testing executable on a local drive or you can change the .NET security settings using the “Microsoft .NET Framework 2.0 Configuration” program in the found under “Administrative Tools” in your Windows Control Panel where you can edit the “Runtime Security Policy” for your user or machine. For an easy way to just give full trust to your network drive, see the following link how to do that:
http://www.sellsbrothers.com/news/showT ... Topic=1519
Regards,
Alex
Ranorex Support Team
You can either copy your testing executable on a local drive or you can change the .NET security settings using the “Microsoft .NET Framework 2.0 Configuration” program in the found under “Administrative Tools” in your Windows Control Panel where you can edit the “Runtime Security Policy” for your user or machine. For an easy way to just give full trust to your network drive, see the following link how to do that:
http://www.sellsbrothers.com/news/showT ... Topic=1519
Regards,
Alex
Ranorex Support Team
-
- Posts: 17
- Joined: Tue Dec 02, 2008 10:09 am
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
-
- Posts: 17
- Joined: Tue Dec 02, 2008 10:09 am
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
-
- Posts: 17
- Joined: Tue Dec 02, 2008 10:09 am