private void InterrogateItem(Window w, IUIItem i) { System.Diagnostics.Debug.Print(i.ToString()); w.Mouse.Location = new System.Windows.Point(i.Bounds.Left + i.Bounds.Width / 2, i.Bounds.Top + i.Bounds.Height / 2); if (i is UIItemContainer) { var ic = i as UIItemContainer; foreach (var mb in ic.MenuBars) { System.Diagnostics.Debug.Print(mb.ToString()); w.Mouse.Location = new System.Windows.Point(mb.Bounds.Left + mb.Bounds.Width / 2, mb.Bounds.Top + mb.Bounds.Height / 2); } foreach (var x in ic.Items) { InterrogateItem(w, x); w.Mouse.Location = new System.Windows.Point(x.Bounds.Left + x.Bounds.Width / 2, x.Bounds.Top + x.Bounds.Height / 2); } } }