public UIItemContainer GetMdiWindowByAutomationId(string id) { UIItemContainer container = null; WaitHandler.WaitUntil(() => { try { var ele = window.GetElement(SearchCriteria.ByAutomationId(id)); container = new UIItemContainer(ele, HuxleyApplication.MainForm.window.ActionListener); return(true); } catch (Exception e) { return(false); } }, "cannot find element "); return(container); }