Beispiel #1
0
        public static void WaitDataContextSet(this AutomationElement element, Func <string> actionDescription = null, int?timeOut = null)
        {
            if (actionDescription == null)
            {
                actionDescription = () => "Has DataContext";
            }

            element.Wait(() =>
            {
                var newValue = element.Current.ItemStatus;
                if (newValue.HasText())
                {
                    return(true);
                }

                element.AssertMessageBoxChild();

                return(false);
            }, actionDescription, timeOut);
        }