예제 #1
0
        /// <summary>
        /// method to apply when a non-terminal node has been found
        /// </summary>
        /// <param name="ah"></param>
        public void visitNode(AccessibilityHelper ah)
        {         // does this ah need to be clicked or something to get to its children?
            if (1 == m_logLevel)
            {
                m_log.paragraph(makeNameTag() + "Click found &quot;" + ah.Role + ":" + ah.Name + "&quot;");
            }

            if ((ah.Role == AccessibleRole.MenuItem) || (m_for != null && "all" == (string)m_for))
            {
                if (1 == m_logLevel)
                {
                    m_log.paragraph(makeNameTag() + "Click determining what to do with this intermediate step");
                }
                bool isFocused = (ah.States & AccessibleStates.Focused) == AccessibleStates.Focused;
                if (!isFocused)
                {
                    if (1 == m_logLevel)
                    {
                        m_log.paragraph(makeNameTag() + "Clicking relative to &quot;" + ah.Role + ":" + ah.Name + "&quot; by (" + m_dx + ", " + m_dy + ") since it does not have focus");
                    }
                    ah.SimulateClickRelative(m_dx, m_dy);
                }
                else
                {
                    if (1 == m_logLevel)
                    {
                        m_log.paragraph(makeNameTag() + "Click hovering on &quot;" + ah.Role + ":" + ah.Name + "&quot; since it has focus");
                    }
                    ah.MoveMouseOverMe();                     // hover
                }
            }
        }
예제 #2
0
 /// <summary>
 /// method to apply when a non-terminal node has been found
 /// </summary>
 /// <param name="ah"></param>
 public void visitNode(AccessibilityHelper ah)
 {                         // does this ah need to be clicked or something to get to its children?
     ah.MoveMouseOverMe(); // hover
     if (1 == m_logLevel)
     {
         m_log.paragraph("HoverOver hovering over &quot;" + ah.Role + ":" + ah.Name + "&quot;");
     }
 }
예제 #3
0
 /// <summary>
 /// method to apply when a non-terminal node has been found
 /// </summary>
 /// <param name="ah"></param>
 public void visitNode(AccessibilityHelper ah)
 {         // does this ah need to be clicked or something to get to its children?
     if (ah.Role == AccessibleRole.MenuItem)
     {
         bool isFocused = (ah.States & AccessibleStates.Focused) == AccessibleStates.Focused;
         if (!isFocused)
         {
             ah.SimulateClickRelative(10, 10);
         }
         else
         {
             ah.MoveMouseOverMe();                             // hover
         }
     }
 }