Get events using SubscribeEvent

Class library usage, coding and language questions.
akter
Posts: 1
Joined: Fri Jan 29, 2016 10:17 am

Get events using SubscribeEvent

Post by akter » Mon Feb 01, 2016 5:43 am

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?

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Get events using SubscribeEvent

Post by Support Team » Tue Feb 02, 2016 4:19 pm

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