public void CanAccessSaveButton()
        {
            var screen = new FrontScreen();
            var windowPeer = new WindowAutomationPeer(screen);
            var children = windowPeer.GetChildren();
            var peer = children[1] as IInvokeProvider;
            peer.Invoke();

            Assert.That(children != null);
        }
        public void tesDel_btn()
        {
            aps.Show();
            WindowAutomationPeer wpa = new WindowAutomationPeer(aps);
            List<AutomationPeer> anak = wpa.GetChildren();

            TextBoxAutomationPeer textBoxPeer = (TextBoxAutomationPeer)anak[1];
            ButtonAutomationPeer buttonPeer = (ButtonAutomationPeer)anak[17];

            Button but = (Button)buttonPeer.Owner;
            TextBox tek = (TextBox)textBoxPeer.Owner;

            RoutedEventArgs args = new RoutedEventArgs(Button.ClickEvent, but);
            but.RaiseEvent(args);
            Assert.AreEqual("", tek.Text.ToString(), "Invalid");
        }