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

UIAutomation Click using Invoke Pattern of AutomationElement

$
0
0

I want to click on a tab which has invoke pattern only. I am getting the invoke pattern of the AutomationElement and Invoke() method is also getting executed but click is not happening on the tab of the application. Here is my code snippet :

 foreach (AutomationElement AE in serviceRequestTab)
                {
                    if (AE.Current.Name == "Notes")
                    {
                        InvokePattern ptrnServiceRequestTab = AE.GetCurrentPattern(InvokePattern.Pattern) as InvokePattern;
                        //System.Windows.Point pt= AE.GetClickablePoint();
                        if (ptrnServiceRequestTab != null)
                        {
                            ptrnServiceRequestTab.Invoke();
                            Thread.Sleep(4000);
                        }
                    }
                }

Besides using GetClickalblePoint() method throws exception : "Element doesn't have any clickable point".

Anyone who can help me out?


Viewing all articles
Browse latest Browse all 585

Trending Articles



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