Ejemplo n.º 1
0
 /// <summary>
 /// Implements <see cref="IUIItem.Focus"/>
 /// </summary>
 public virtual void Focus()
 {
     actionListener.ActionPerforming(this);
     try
     {
         automationElement.Focus();
         ActionPerformed();
     }
     catch
     {
         Logger.Debug("Could not set focus on " + AutomationElement.Display());
     }
 }
Ejemplo n.º 2
0
 public virtual void DoubleClickOutsideToolTip(UIItem uiItem, IActionListener actionListener)
 {
     actionListener.ActionPerforming(uiItem);
     ToolTip toolTip = GetToolTip(uiItem, actionListener);
     if (toolTip == null)
         mouse.DoubleClick(uiItem.Bounds.Center(), actionListener);
     else
     {
         logger.Debug("Found tooltip DoubleClicking outside tooltip bounds");
         mouse.DoubleClick(toolTip.LeftOutside(uiItem.Bounds), actionListener);
     }
 }
Ejemplo n.º 3
0
        private void MakeLastItemReadyForPerformingAction()
        {
            if (Count == 0)
            {
                return;
            }
            ListItem lastItem = Item(Count - 1);

            if (lastItem.Bounds.IsZeroSize() || string.IsNullOrEmpty(lastItem.Text))
            {
                actionListener.ActionPerforming(lastItem);
            }
        }
Ejemplo n.º 4
0
        public virtual void ClickOutsideToolTip(UIItem uiItem, IActionListener actionListener)
        {
            actionListener.ActionPerforming(uiItem);
            ToolTip toolTip = GetToolTip(uiItem, actionListener);

            if (toolTip == null)
            {
                mouse.LeftClick(uiItem.Bounds.Center(), actionListener);
            }
            else
            {
                logger.Debug("Found tooltip Clicking outside tooltip bounds");
                mouse.LeftClick(toolTip.LeftOutside(uiItem.Bounds), actionListener);
            }
        }
Ejemplo n.º 5
0
 public virtual void RightClickOutsideToolTip(UIItem uiItem, IActionListener actionListener)
 {
     actionListener.ActionPerforming(uiItem);
     ToolTip toolTip = GetToolTip(uiItem, actionListener);
     if (toolTip == null)
     {
         //Because mouse has already been moved
         mouse.Click(MouseButton.Right, actionListener);
     }
     else
     {
         logger.Debug("Found tooltip RightClicking outside tooltip bounds");
         mouse.RightClick(toolTip.LeftOutside(uiItem.Bounds), actionListener);
     }
 }
Ejemplo n.º 6
0
        public virtual void RightClickOutsideToolTip(UIItem uiItem, IActionListener actionListener)
        {
            actionListener.ActionPerforming(uiItem);
            ToolTip toolTip = GetToolTip(uiItem, actionListener);

            if (toolTip == null)
            {
                //Because mouse has already been moved
                mouse.Click(MouseButton.Right, actionListener);
            }
            else
            {
                logger.Debug("Found tooltip RightClicking outside tooltip bounds");
                mouse.RightClick(toolTip.LeftOutside(uiItem.Bounds), actionListener);
            }
        }