public static GuiDataGrid GetDataGrid(AutomationElement window, string automationId) { if (_cachedDatagrid == null || _cachedDatagrid.AutomationId != automationId) { var dataGrid = window.FindChildByClassAndAutomationId("DataGrid", automationId); _cachedDatagrid = new GuiDataGrid(dataGrid, automationId); } return _cachedDatagrid; }
public static GuiDatePicker GetDatePicker(AutomationElement window, string automationId) { if (_cachedDp == null || _cachedDp.AutomationId != automationId) { //var tb = window.FindChildByControlTypeAndAutomationId(ControlType.Calendar, automationId); var d = window.FindChildByClassAndAutomationId("DatePicker", automationId); _cachedDp = new GuiDatePicker(d); } return _cachedDp; }
public static GuiImage Find(AutomationElement window, string automationId) { var res = window.FindChildByClassAndAutomationId("Image", automationId); return new GuiImage(res); }