Posting here but really unsure whether this forum is even monitored by the Dev team anymore.
I've been using White for a while now but tend to use a mixture of White and the underlying UIAutomation as the latter is more accurate.
Anyway, my query is this....the snippet of code below fails for white but succeeds for UIAutomation and I'm a little lost as to why.
The White code below fails on both counts to find the said window
windowList = Desktop.Instance.Windows().FindAll(obj => obj.Name.Contains(windowName));
windowList = Desktop.Instance.Windows().FindAll(obj => obj.Title.Contains(windowName));
However, the UIAutomation code finds the window no problem.
Condition condition1 = new PropertyCondition(AutomationElement.NameProperty, windowName);
Condition condition2 = new PropertyCondition(AutomationElement.ControlTypeProperty, ControlType.Window);
AndCondition AndCondition1 = new AndCondition(condition1, condition2); AutomationElement window = AutomationElement.RootElement.FindAll(TreeScope.Descendants, AndCondition1);
The depth level using white has been set to 10 which I believe is more than adequate as the window in question is 4 levels from the Desktop hierarchy.