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?