Page 1 of 1

Get events using SubscribeEvent

Posted: Mon Feb 01, 2016 5:43 am
by akter
Hi

I develop app using Ranorex API. I try to subscribe on an event using SubscribeEvent.

Example:

Code: Select all

buttons[0].Element.SubscribeEvent("Click", new Action(() => MessageBox.Show("Hi!")));
howewer I get Exception

Code: Select all

Ranorex.EventSubscriptionFailedException: Subscribing to event 'Click' failed on element '{Button:button17}'. ---> System.NotSupportedException: The operation is not supported.
Does it not work?

Has Ranorex other options for check Click-events for a button?

Re: Get events using SubscribeEvent

Posted: Tue Feb 02, 2016 4:19 pm
by Support Team
Hello akter,

Unfortunately, the methods „Subscribe/Unsubscribe Event“ are actually not implemented and will be removed in one of our future releases. There is also no other out-of-the-box functionality to subscribe to events from other processes.

Since Ranorex is based on C# it might be possible to develop your own “subscriber” mechanism.

Thank you for your understanding.

Sincerely,
Robert