I took the examples from here:http://www.ranorex.com/support/user-gui ... apter.html and created a simple Winforms app in C#. Then a very basic project in Ranorex 6.1.0 to get a grasp on how delegates work in Ranorex (using invokeremotely). I didn't get very far however because before I was able to try out delegates I came across an issue where a simple Winforms control (Button, Checkbox, TextBox) was not able to be transformed into a Ranorex Control.

I keep getting the following when I execute this project:

The element does not support the required capability 'control'.

at Ranorex.Adapter..ctor(Element element) at testDelegateSimple.Class1.GoDoIt() at testDelegateSimple.Recording1.Ranorex.Core.Testing.ITestModule.Run() at Ranorex.Core.Testing.TestModuleLeaf.RunInternal(DataContext parentDataContext)

What am I doing wrong? I'm executing both of these applications as the same user (admin rights). They are both compiled with the same.Net versions, platforms and targets.

Please note that the Ranorex project is saved as compiling to x86/Debug, but I've tried all possible combinations on both the app and Ranorex side to get this to work. I'm at a point now where I've tried to repair my Visual Studio 2015 and Ranorex installations, and I'm still having that exception. Maybe I'm missing something basic in my understanding of the Ranorex Control?

After I can actually invoke remotely, I'm planning on using delegates to get the return of a non-serializable return parameter in my AUT by passing a string back from the delegate. Have to get past this hurdle first though, so I can use the invokeremote method.

The issue is that you access the wrong UI element which doesn't support the capability 'control'. It seems like you disabled the MSAA option 'Filter Elements'. As a consequence, the corresponding button is recognized twice (via the WinForms plugin and MSAA).

button_msaa.png (10.24 KiB) Viewed 961 times

I would suggest using the path "/form[@title='Form1']//button[@controlname='button1']" that points to the correct element. The same is true for the other UI elements. After changing the RanoreXPath for the button, the InvokeRemotely method could be executed successfully.