Пример #1
0
        /// <summary>
        /// Checks if the specified element representing the Eudora
        /// window is the Inbox
        /// </summary>
        /// <param name="element">the automation element</param>
        /// <returns>true if it is</returns>
        protected bool isInboxWindow(AutomationElement element)
        {
            Log.Debug();
            bool retVal = element != null &&
                          AgentUtils.IsAncestorByAutomationId(element,
                                                              "ListBox",
                                                              "ControlType.List",
                                                              "1159");

            Log.Debug("Returning " + retVal);
            return(retVal);
        }
Пример #2
0
        /// <summary>
        /// Is the focused element the Address textbox?
        /// </summary>
        /// <param name="focusedElement">The control in focus</param>
        /// <returns>true if it is</returns>
        public bool IsAddressWindow(AutomationElement focusedElement)
        {
            var retVal = focusedElement != null &&
                         String.Compare(focusedElement.Current.ClassName, "Edit", true) == 0 &&
                         String.Compare(focusedElement.Current.ControlType.ProgrammaticName, "ControlType.Edit", true) == 0;

            if (retVal)
            {
                retVal = AgentUtils.IsAncestorByAutomationId(focusedElement, "Address Band Root", "ControlType.Pane", "41477");
            }

            return(retVal);
        }
Пример #3
0
        /// <summary>
        /// Checks if the specified element representing the Eudora
        /// window is the mail compose window
        /// </summary>
        /// <param name="element">the automation element</param>
        /// <returns>true if it is</returns>
        protected bool isMailComposeWindow(AutomationElement element)
        {
            Log.Debug();
            bool retVal = element != null &&
                          AgentUtils.IsAncestorByAutomationId(element,
                                                              "AfxMDIFrame70",
                                                              "ControlType.Pane",
                                                              "59648");

            if (retVal)
            {
                Log.Debug("Checking if sibling is to fieild");
                retVal = AgentUtils.IsSiblingByAutomationId(element, "Edit", "ControlType.Document", "5050");
                Log.Debug("isSibling returned " + retVal);
            }

            Log.Debug("Returning " + retVal);
            return(retVal);
        }