var navigator = BonusAppControllers.EbsControl.CurrentApp.GetWindow("XWindow").Get(SearchCriteria.ByAutomationId("AnimatedExplorerNavigator"));
AutomationElement dashboardElement = navigator.AutomationElement.FindFirst(TreeScope.Subtree,SearchConditionFactory.CreateForName("NavigateLink_1").AutomationCondition);
var dashBoardBtn = new Button(dashboardElement, navigator.ActionListener);
dashBoardBtn.Click();
I have this code for the button with Name as NavigateLink_1. Now when i run this and debug it, I find that I am able to get the correct button instance in the dashBoardBtn variable but the Click() function isn't working. Even if i try to do all this just by using the button name as in using Get(SearchCriteria.ByText("NavigateLink_1")) I face the same problem. The same thing I tried with some other button part of the same group of buttons but it's working fine in that case.
Can Anyone suggest me what could be the problem.I am using the White Framework and UI Spy as the UI inspector for my application