示例#1
0
        public static void SetCheckBoxByPreviousControl(this TestBase @this, AutomationProperty searchBy, object value, bool checkIn, AutomationElement labelRetrievedControl = null)
        {
            var label    = @this.App.FindDescendant(searchBy, value, labelRetrievedControl);
            var checkBox = @this.App.FindNextSibling(label);

            ControlProvider.Transfer <AECheckBox>(checkBox).Check(checkIn);
        }
示例#2
0
        public static void EnterTextByPreviousControl(this TestBase @this, AutomationProperty searchBy, object value, string text, AutomationElement labelRetrievedControl = null)
        {
            var label    = @this.App.FindDescendant(searchBy, value, labelRetrievedControl);
            var comboBox = @this.App.FindNextSibling(label);

            ControlProvider.Transfer <AEEdit>(comboBox).Set(text);
        }
示例#3
0
        public static void EnterTextByPreviousControl(this TestBase @this, string controlName, string text, AutomationElement labelRetrievedControl = null)
        {
            var label    = @this.Gui(controlName, labelRetrievedControl);
            var comboBox = @this.App.FindNextSibling(label);

            ControlProvider.Transfer <AEEdit>(comboBox).Set(text);
        }
示例#4
0
        public static void ClickButtonByChildElement(this TestBase @this, string controlName, AutomationElement retrievedControl = null)
        {
            var child  = @this.Gui(controlName, retrievedControl);
            var target = @this.App.FindParent(child);

            ControlProvider.Transfer <AEButton>(target).Click();
        }
示例#5
0
        public static void SelectListByPreviousControl(this TestBase @this, string controlName, int itemIndex, AutomationElement labelRetrievedControl = null)
        {
            var label    = @this.Gui(controlName, labelRetrievedControl);
            var comboBox = @this.App.FindNextSibling(label);

            ControlProvider.Transfer <AEComboBox>(comboBox).Select(itemIndex);
        }
示例#6
0
        public static void SelectListByPreviousControl(this TestBase @this, AutomationProperty searchBy, object value, int itemIndex, AutomationElement labelRetrievedControl = null)
        {
            var label    = @this.App.FindDescendant(searchBy, value, labelRetrievedControl);
            var comboBox = @this.App.FindNextSibling(label);

            ControlProvider.Transfer <AEComboBox>(comboBox).Select(itemIndex);
        }
示例#7
0
        public static void ClickButtonByChildElement(this TestBase @this, AutomationProperty searchBy, object value, AutomationElement retrievedControl = null)
        {
            var child  = @this.App.FindDescendant(searchBy, value, retrievedControl);
            var target = @this.App.FindParent(child);

            ControlProvider.Transfer <AEButton>(target).Click();
        }
示例#8
0
        public static void SetCheckBoxByPreviousControl(this TestBase @this, string controlName, bool checkIn, AutomationElement labelRetrievedControl = null)
        {
            var label    = @this.Gui(controlName, labelRetrievedControl);
            var checkBox = @this.App.FindNextSibling(label);

            ControlProvider.Transfer <AECheckBox>(checkBox).Check(checkIn);
        }
示例#9
0
        public static void ClickTabItem(this TestBase @this, AutomationProperty searchBy, object value, AutomationElement retrievedControl = null)
        {
            Dictionary <AutomationProperty, object> searchCretia = new Dictionary <AutomationProperty, object>();

            searchCretia.Add(SearchBy.ByControlType, ControlType.TabItem);
            searchCretia.Add(searchBy, value);
            var target = @this.App.FindDescendant(searchCretia, retrievedControl);

            ControlProvider.Transfer <AETabItem>(target).Select();
        }
示例#10
0
        public static void ClickRibbonTab(this TestBase @this, AutomationProperty searchBy, object value, AutomationElement retrieveControl = null)
        {
            var target = @this.App.FindDescendant(searchBy, value, retrieveControl);

            ControlProvider.Transfer <AETabItem>(target).Select();
        }
示例#11
0
        public static void ClickToggleButton(this TestBase @this, string controlName, AutomationElement retrieveControl = null)
        {
            var target = @this.Gui(controlName, retrieveControl);

            ControlProvider.Transfer <AEButton2>(target).Click();
        }
示例#12
0
 public static void ClickToggleButton(this TestBase @this, AutomationElement btn)
 {
     ControlProvider.Transfer <AEButton2>(btn).Click();
 }
示例#13
0
        public static void ClickButton(this TestBase @this, Dictionary <AutomationProperty, object> searchCriteria, AutomationElement retrieveControl = null)
        {
            var target = @this.App.FindDescendant(searchCriteria, retrieveControl);

            ControlProvider.Transfer <AEButton>(target).Click();
        }
示例#14
0
        public static void ClickRibbonTab(this TestBase @this, string controlName, AutomationElement retrieveControl = null)
        {
            var target = @this.Gui(controlName, retrieveControl);

            ControlProvider.Transfer <AETabItem>(target).Select();
        }
示例#15
0
        public static void SelectList(this TestBase @this, string controlName, int itemIndex, AutomationElement retrieveControl = null)
        {
            var target = @this.Gui(controlName, retrieveControl);

            ControlProvider.Transfer <AEComboBox>(target).Select(itemIndex);
        }
示例#16
0
 public static void SelectListItem(this TestBase @this, AutomationElement list, int itemIndex)
 {
     ControlProvider.Transfer <AEList>(list).Select(itemIndex);
 }
示例#17
0
        public static void EnterText(this TestBase @this, string controlName, string text, AutomationElement retrieveControl = null)
        {
            var target = @this.Gui(controlName, retrieveControl);

            ControlProvider.Transfer <AEEdit>(target).Set(text);
        }
示例#18
0
        public static void EnterText(this TestBase @this, AutomationProperty searchBy, object value, string text, AutomationElement retrieveControl = null)
        {
            var target = @this.App.FindDescendant(searchBy, value, retrieveControl);

            ControlProvider.Transfer <AEEdit>(target).Set(text);
        }
示例#19
0
 public static void ClickTreeItem(this TestBase @this, AutomationElement target)
 {
     ControlProvider.Transfer <AETreeItem>(target).Select();
 }
示例#20
0
 public static void SelectListItem(this TestBase @this, AutomationElement list, string itemText)
 {
     ControlProvider.Transfer <AEList>(list).Select(itemText);
 }
示例#21
0
        public static void ExpandMenu(this TestBase @this, string controlName, AutomationElement retrievedControl = null)
        {
            var target = @this.Gui(controlName, retrievedControl);

            ControlProvider.Transfer <AEMenu>(target).Expand();
        }
示例#22
0
 public static void SelectList(this TestBase @this, AutomationElement combo, string itemText)
 {
     ControlProvider.Transfer <AEComboBox>(combo).Select(itemText);
 }
示例#23
0
        public static void SelectList(this TestBase @this, AutomationProperty searchBy, object value, int itemIndex, AutomationElement retrieveControl = null)
        {
            var target = @this.App.FindDescendant(searchBy, value, retrieveControl);

            ControlProvider.Transfer <AEComboBox>(target).Select(itemIndex);
        }