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 void InvalidateCache() { _cachedDp = null; }