public override void GetClassName() { TabItem tabItem = CreateConcreteFrameworkElement() as TabItem; AutomationPeer peer = FrameworkElementAutomationPeer.CreatePeerForElement(tabItem) as AutomationPeer; Assert.AreEqual("TabItem", peer.GetClassName(), "#0"); }
public override void GetClassName() { CreateAsyncTest(calendar, () => { List <AutomationPeer> buttonChildren = GetButtonChildren(); AutomationPeer peer = buttonChildren[0]; Assert.AreEqual("CalendarButton", peer.GetClassName(), "GetClassName"); }); }
protected override string GetClassNameCore() { AutomationPeer wrapperPeer = GetWrapperPeer(); if (wrapperPeer != null) { return(wrapperPeer.GetClassName()); } return(string.Empty); }
public void AllTests() { AutomationPeer peer = FrameworkElementAutomationPeer.CreatePeerForElement(CreateConcreteFrameworkElement()); // GetAutomationControlType Assert.AreEqual(AutomationControlType.DataItem, peer.GetAutomationControlType(), "GetAutomationControlType"); // GetClassName Assert.AreEqual("DataGridRow", peer.GetClassName(), "GetClassNameCore"); }
/// <summary> /// Return class name for automation clients to display /// </summary> protected override string GetClassNameCore() { AutomationPeer wrapperPeer = GetWrapperPeer(); if (wrapperPeer != null) { return(wrapperPeer.GetClassName()); } return("RibbonMenuItem"); }
public void AllTests() { AutomationPeer peer = FrameworkElementAutomationPeer.CreatePeerForElement(CreateConcreteFrameworkElement()); // ContentTest Assert.IsNull(peer.GetChildren(), "#0"); // IsContentElement Assert.IsFalse(peer.IsContentElement(), "IsContentElement"); // GetClassName Assert.AreEqual("DataGridDetailsPresenter", peer.GetClassName(), "GetClassNameCore"); }
public void AllTests() { AutomationPeer peer = FrameworkElementAutomationPeer.CreatePeerForElement(CreateConcreteFrameworkElement()); // GetClassName Assert.AreEqual("DataGridRowsPresenter", peer.GetClassName(), "GetClassNameCore"); // IsContent Assert.IsFalse(peer.IsContentElement(), "IsContentElement"); // GetChildren and Content List <AutomationPeer> children = peer.GetChildren(); Assert.IsNotNull(children, "#0"); Assert.AreEqual(0, children.Count, "#1"); }
public void AllTests() { DataGridColumnHeader fe = CreateConcreteFrameworkElement() as DataGridColumnHeader; AutomationPeer peer = FrameworkElementAutomationPeer.CreatePeerForElement(fe); // GetAutomationControlType Assert.AreEqual(AutomationControlType.HeaderItem, peer.GetAutomationControlType(), "GetAutomationControlType"); // GetBoundingRectangle Rect boundingRectangle = peer.GetBoundingRectangle(); Assert.AreNotEqual(0, boundingRectangle.X, "GetBoundingRectangle X"); Assert.AreNotEqual(0, boundingRectangle.Y, "GetBoundingRectangle Y"); Assert.AreNotEqual(0, boundingRectangle.Width, "GetBoundingRectangle Width"); Assert.AreNotEqual(0, boundingRectangle.Height, "GetBoundingRectangle Height"); // GetChildren List <AutomationPeer> children = peer.GetChildren(); Assert.IsNotNull(children, "#0"); Assert.AreEqual(1, children.Count, "#1"); // IsKeyboardFocusable Assert.IsFalse(peer.IsKeyboardFocusable(), "IsKeyboardFocusable"); // GetClassName Assert.AreEqual("DataGridColumnHeader", peer.GetClassName(), "#0"); // IsContentElement Assert.IsFalse(peer.IsContentElement(), "#0"); // GetName Assert.AreEqual(fe.Content, peer.GetName(), "GetName"); // GetClickablePoint Point p = peer.GetClickablePoint(); Assert.IsFalse(double.IsNaN(p.X), "#0"); Assert.IsFalse(double.IsNaN(p.Y), "#1"); // GetParent Assert.IsNotNull(peer.GetParent(), "GetParent"); // IsOffscreen Assert.IsFalse(peer.IsOffscreen(), "IsOffScreen"); }
public override void GetClassName() { AutomationPeer peer = FrameworkElementAutomationPeer.CreatePeerForElement(CreateConcreteFrameworkElement()); Assert.AreEqual("Popup", peer.GetClassName(), "GetClassName"); }