Пример #1
0
        private static Condition CreateTitleBarCondition()
        {
            var automationID = AutomationID.Is("TitleBar") | AutomationID.Is("TitleBarLeftButtons");
            var className    = ClassName.Is("ApplicationFrameTitleBarWindow");

            return(automationID & className & Win32Framework);
        }
Пример #2
0
        protected override Condition CreateCondition()
        {
            // This rule is based on documentation at https://docs.microsoft.com/en-us/windows/win32/winauto/uiauto-supportlistcontroltype
            // But we don't check Win32 lists because we know they will fail and the framework is no longer supported

            return(List
                   & ~ClassName.Is("SysListView32"));
        }
        private static Condition CreateTitleBarCondition()
        {
            var automationID = AutomationID.Is("TitleBar") | AutomationID.Is("TitleBarLeftButtons");
            var className    = ClassName.Is("ApplicationFrameTitleBarWindow");
            var framework    = StringProperties.Framework.Is(Core.Enums.Framework.Win32);

            return(automationID & className & framework);
        }
        protected override Condition CreateCondition()
        {
            var dataGridDetailsPresenter = ClassName.Is("DataGridDetailsPresenter") & Parent(DataItem);

            return(Custom
                   & IsKeyboardFocusable
                   & LocalizedControlType.NotNullOrEmpty
                   & ~dataGridDetailsPresenter);
        }
Пример #5
0
        private static Condition CreateUnfocusableControlsBasedOnExplorerCondition()
        {
            var IsDirectUIFramework = StringProperties.Framework.Is("DirectUI");

            // Based on Win10 Explorer behavior, these exclusions are made.
            return((Button & ClassName.Is("UIExpandoButton") & IsDirectUIFramework)
                   | (SplitButton & ~IsKeyboardFocusable & SecondChild & Parent(Group) & (SiblingCount() == 2) & SiblingsOfSameType)
                   | (Edit & Patterns.ValueReadOnly)
                   | (Edit & ClassName.Is("UIProperty") & IsDirectUIFramework)
                   | (Button & Parent(SplitButton) & IsDirectUIFramework & AutomationID.Is("Dropdown")));
        }
Пример #6
0
        private static Condition CreateUnfocusableControlsBasedOnOfficeCondition()
        {
            // the following menu item never gets focus because its child, an edit field, always gets focus
            var quickHelpMenuItem = MenuItem & AutomationID.Is("TellMeControlAnchor");

            var buttons = Button
                          & (ClassName.Is("NetUIAppFrameHelper")   // min, max, close buttons for documents/spreadsheets
                             | ClassName.Is("NetUIFolderBarRoot")
                             | ClassName.Is("NetUIStickyButton")); // pin buttons on Word home screen.

            return(buttons | quickHelpMenuItem);
        }
        protected override Condition CreateCondition()
        {
            // Windows and dialogs can be any size, regardless of their parents
            var isDialog = Pane & IsDialog;

            //  Light dismiss buttons cover the whole window so that clicking dismisses the combo box
            var isLightDismissButton = Button & IsNotKeyboardFocusable & XAML & ClassName.Is("ComboBoxLightDismiss");

            return(~Window
                   & ~isDialog
                   & IsNotOffScreen
                   & BoundingRectangle.Valid
                   & ParentExists
                   & Parent(IsNotDesktop)
                   & Parent(BoundingRectangle.Valid)
                   & ~isLightDismissButton);
        }