Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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();
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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();
        }
Esempio n. 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);
        }
Esempio n. 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();
        }
Esempio n. 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();
        }
Esempio n. 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();
        }
Esempio n. 12
0
 public static void ClickToggleButton(this TestBase @this, AutomationElement btn)
 {
     ControlProvider.Transfer <AEButton2>(btn).Click();
 }
Esempio n. 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();
        }
Esempio n. 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();
        }
Esempio n. 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);
        }
Esempio n. 16
0
 public static void SelectListItem(this TestBase @this, AutomationElement list, int itemIndex)
 {
     ControlProvider.Transfer <AEList>(list).Select(itemIndex);
 }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 19
0
 public static void ClickTreeItem(this TestBase @this, AutomationElement target)
 {
     ControlProvider.Transfer <AETreeItem>(target).Select();
 }
Esempio n. 20
0
 public static void SelectListItem(this TestBase @this, AutomationElement list, string itemText)
 {
     ControlProvider.Transfer <AEList>(list).Select(itemText);
 }
Esempio n. 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();
        }
Esempio n. 22
0
 public static void SelectList(this TestBase @this, AutomationElement combo, string itemText)
 {
     ControlProvider.Transfer <AEComboBox>(combo).Select(itemText);
 }
Esempio n. 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);
        }