Esempio n. 1
0
        public AutomationElement CreateCapture(int?timeOut = null)
        {
            if (CreateButton.Current.IsOffscreen)
            {
                throw new InvalidOperationException("Create button not visible on SearchControl {0}".FormatWith(Element.Current.Name));
            }

            var win = Element.CaptureWindow(
                () => CreateButton.ButtonInvoke(),
                () => "Create a new entity on SearchControl ({0})".FormatWith(Element.Current.Name), timeOut);

            return(win);
        }