public virtual void ClickOutsideToolTip(UIItem uiItem, ActionListener actionListener)
        {
            actionListener.ActionPerforming(uiItem);
            ToolTip toolTip = GetToolTip(uiItem, actionListener);

            if (toolTip == null)
            {
                mouse.Click(uiItem.Bounds.Center(), actionListener);
            }
            else
            {
                logger.Debug("Found tooltip Clicking outside tooltip bounds");
                mouse.Click(toolTip.LeftOutside(uiItem.Bounds), actionListener);
            }
        }
        public virtual void RightClickOutsideToolTip(UIItem uiItem, ActionListener actionListener)
        {
            actionListener.ActionPerforming(uiItem);
            ToolTip toolTip = GetToolTip(uiItem, actionListener);

            if (toolTip == null)
            {
                //Because mouse has already been moved
                mouse.RightClickHere(actionListener);
            }
            else
            {
                logger.Debug("Found tooltip RightClicking outside tooltip bounds");
                mouse.RightClick(toolTip.LeftOutside(uiItem.Bounds), actionListener);
            }
        }
Beispiel #3
0
        /// <summary>
        /// Find all the UIItems which belongs to a window and are within (bounds of) another UIItem.
        /// </summary>
        /// <param name="containingItem">Containing item</param>
        /// <returns>List of all the items.</returns>
        public virtual List <UIItem> ItemsWithin(UIItem containingItem)
        {
            UIItemCollection itemsWithin = factory.ItemsWithin(containingItem.Bounds, this);

            return(itemsWithin.Where(item => !item.Equals(containingItem)).Cast <UIItem>().ToList());
        }
Beispiel #4
0
 public virtual ToolTip GetToolTipOn(UIItem uiItem)
 {
     Mouse.Location = uiItem.Bounds.Center();
     uiItem.Focus();
     return(ToolTip);
 }
 public virtual void ActionPerforming(UIItem uiItem)
 {
 }
Beispiel #6
0
 public override void ActionPerforming(UIItem uiItem)
 {
     new ScreenItem(uiItem, ScrollBars).MakeVisible(this);
 }
 public ToggleableItem(UIItem uiItem) : base(uiItem.AutomationElement, uiItem.ActionListener)
 {
 }