/// <summary>
        /// Returns a Menu object.
        /// </summary>
        /// <param name="gettype">The search criteria type to locate the object.</param>
        public Menu GetMenuItem(SearchCriteria GetType)
        {
            Menu uiItem = Retry.For(() => Screen.Get <Menu>(GetType), TimeSpan.FromSeconds(5));

            return(uiItem);
        }
        public Table GetTable(SearchCriteria GetType)
        {
            Table table = Retry.For(() => Screen.Get <Table>(GetType), TimeSpan.FromSeconds(5));

            return(table);
        }
        /// <summary>
        /// Returns a label object.
        /// </summary>
        /// <param name="gettype">The search criteria type to locate the object.</param>
        public Label GetLabel(SearchCriteria GetType)
        {
            Label uiItem = Retry.For(() => Screen.Get <Label>(GetType), TimeSpan.FromSeconds(5));

            return(uiItem);
        }
        /// <summary>
        /// Returns a listview object.
        /// </summary>
        /// <param name="gettype">The search criteria type to locate the object.</param>
        public ListView GetListView(SearchCriteria GetType)
        {
            ListView uiItem = Retry.For(() => Screen.Get <ListView>(GetType), TimeSpan.FromSeconds(5));

            return(uiItem);
        }
        /// <summary>
        /// Returns a tab object.
        /// </summary>
        /// <param name="gettype">The search criteria type to locate the object.</param>
        public Tab GetTab(SearchCriteria GetType)
        {
            Tab uiItem = Retry.For(() => Screen.Get <Tab>(GetType), TimeSpan.FromSeconds(5));

            return(uiItem);
        }
 /// <summary>
 /// Returns a button object.
 /// </summary>
 /// <param name="gettype">The search criteria type to locate the object.</param>
 public Button GetButton(SearchCriteria GetType)
 {
     return(Retry.For(() => Screen.Get <Button>(GetType), TimeSpan.FromSeconds(10)));
 }
        /// <summary>
        /// Returns a combobox object.
        /// </summary>
        /// <param name="gettype">The search criteria type to locate the object.</param>
        public ComboBox GetComboBox(SearchCriteria GetType)
        {
            ComboBox uiItem = Retry.For(() => Screen.Get <ComboBox>(GetType), TimeSpan.FromSeconds(10));

            return(uiItem);
        }
 public void setLegacyIAccessiblePattern(AutomationElement AE)
 {
     patt_LegacyIAccessiblePattern = patt_LegacyIAccessiblePattern = Retry.For(() =>
                                                                               ((LegacyIAccessiblePattern)AE.GetCurrentPattern(LegacyIAccessiblePattern.Pattern)),
                                                                               TimeSpan.FromSeconds(10));
 }
 public string getLegacyIAccessiblePattern_Value(UIItem uiItem)
 {
     setLegacyIAccessiblePattern(uiItem.AutomationElement);
     return(Retry.For(() => patt_LegacyIAccessiblePattern.Current.Value, TimeSpan.FromSeconds(5)));
 }
 public void setGridPattern(AutomationElement AE)
 {
     patt_GridItemPattern = Retry.For(() =>
                                      ((GridItemPattern)AE.GetCurrentPattern(GridItemPattern.Pattern)),
                                      TimeSpan.FromSeconds(10));
 }
示例#11
0
        public static ToolTip FindToolTip(Func <AutomationElement> perform)
        {
            var automationElement = Retry.For(perform, element => element == null, CoreAppXmlConfiguration.Instance.TooltipWaitTimeSpan());

            return(new ToolTip(automationElement, new NullActionListener()));
        }
示例#12
0
 public void WaitWhileBusy()
 {
     Retry.For(ShellIsBusy, isBusy => isBusy, TimeSpan.FromSeconds(30));
 }
示例#13
0
 private static Window GetWindow(string title)
 {
     return(Retry.For(
                () => _application.GetWindows().First(x => x.Title.Contains(title)),
                TimeSpan.FromSeconds(5)));
 }
示例#14
0
文件: Screen.cs 项目: khanh245/White
 /// <summary>
 ///     The wait while busy.
 /// </summary>
 protected virtual void WaitWhileBusy()
 {
     Retry.For(this.ShellIsBusy, isBusy => isBusy, TimeSpan.FromSeconds(30));
 }