Quantcast
Channel: Windows Desktop Development for Accessibility and Automation forum
Viewing all articles
Browse latest Browse all 585

Listen to Click event from external application

$
0
0

Hello,

I am working on a automation project. I want to listen the click event for ANY element from external application.

AutomationEventHandler UIAEventHandler = new AutomationEventHandler(OnUIAEvent);
                    Automation.AddAutomationEventHandler(InvokePattern.InvokedEvent,
                                            AutomationElement.RootElement,
                                            TreeScope.Descendants, UIAEventHandler);

I tried above InvokeEvent, but it is not listening to click events for all elements.

Could you please tell the right method for this purpose?

Thank you in advance!


Viewing all articles
Browse latest Browse all 585

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>