Пример #1
0
        public void Find(string key)
        {
            using var app = Application.AttachOrLaunch(ExeFileName, "ListBoxWindow");
            var window  = app.MainWindow;
            var listBox = window.FindListBox(key);

            Assert.IsInstanceOf <ListBox>(UiElement.FromAutomationElement(listBox.AutomationElement));
        }
Пример #2
0
        public void FromAutomationElement()
        {
            using var app = Application.Launch(ExeFileName, "ProgressBarWindow");
            var window      = app.MainWindow;
            var progressBar = window.FindProgressBar();

            Assert.IsInstanceOf <ProgressBar>(UiElement.FromAutomationElement(progressBar.AutomationElement));
        }
Пример #3
0
        public void Find()
        {
            using var app = Application.AttachOrLaunch(ExeFileName, "SliderWindow");
            var window = app.MainWindow;
            var slider = window.FindSlider("Slider");

            Assert.IsInstanceOf <Slider>(UiElement.FromAutomationElement(slider.AutomationElement));
        }
Пример #4
0
        public void FromAutomationElement()
        {
            using var app = Application.Launch(ExeFileName, "TreeViewWindow");
            var window       = app.MainWindow;
            var treeViewItem = window.FindTreeView().Items[0];

            Assert.IsInstanceOf <TreeViewItem>(UiElement.FromAutomationElement(treeViewItem.AutomationElement));
        }
        public void Find()
        {
            using var app = Application.Launch(ExeFileName, "GridSplitterWindow");
            var window       = app.MainWindow;
            var gridSplitter = window.FindGridSplitter();

            Assert.IsInstanceOf <GridSplitter>(UiElement.FromAutomationElement(gridSplitter.AutomationElement));
        }
Пример #6
0
        public void Find()
        {
            using var app = Application.Launch(ExeFileName, "StatusBarWindow");
            var window    = app.MainWindow;
            var statusBar = window.FindStatusBar();

            Assert.IsInstanceOf <StatusBar>(UiElement.FromAutomationElement(statusBar.AutomationElement));
        }
Пример #7
0
        public void Find()
        {
            using var app = Application.AttachOrLaunch(ExeFileName, "MenuWindow");
            var window   = app.MainWindow;
            var menuItem = window.FindMenu().Items[0];

            Assert.IsInstanceOf <MenuItem>(UiElement.FromAutomationElement(menuItem.AutomationElement));
        }
        public void Find()
        {
            using var app = Application.AttachOrLaunch(ExeFileName, "SingleDataGridWindow");
            var window = app.MainWindow;
            var header = (DataGridColumnHeader)window.FindFirst(TreeScope.Descendants, Conditions.DataGridColumnHeader);

            Assert.IsInstanceOf <DataGridColumnHeader>(UiElement.FromAutomationElement(header.AutomationElement));
        }
        public void FromAutomationElement()
        {
            using var app = Application.AttachOrLaunch(ExeFileName, WindowName);
            var window     = app.MainWindow;
            var tabControl = window.FindTabControl();

            Assert.IsInstanceOf <TabControl>(UiElement.FromAutomationElement(tabControl.AutomationElement));
        }
Пример #10
0
        public void Find()
        {
            using var app = Application.Launch(ExeFileName, "EmptyWindow");
            var window   = app.MainWindow;
            var titleBar = window.FindTitleBar();

            Assert.IsInstanceOf <TitleBar>(UiElement.FromAutomationElement(titleBar.AutomationElement));
        }
Пример #11
0
        public void FindButton(string key)
        {
            using var app = Application.AttachOrLaunch(ExeFileName, "ButtonWindow");
            var window = app.MainWindow;
            var button = window.FindButton(key);

            Assert.IsAssignableFrom <Button>(UiElement.FromAutomationElement(button.AutomationElement));
        }
Пример #12
0
        public void FindToggleButton(string key)
        {
            using var app = Application.AttachOrLaunch(ExeFileName, "ToggleButtonWindow");
            var window       = app.MainWindow;
            var toggleButton = window.FindToggleButton(key);

            Assert.IsInstanceOf <ToggleButton>(UiElement.FromAutomationElement(toggleButton.AutomationElement));
        }
        public void Find()
        {
            using var app = Application.Launch(ExeFileName, "RichTextBoxWindow");
            var window      = app.MainWindow;
            var richTextBox = window.FindRichTextBox();

            Assert.IsInstanceOf <RichTextBox>(UiElement.FromAutomationElement(richTextBox.AutomationElement));
        }
Пример #14
0
        public void FromAutomationElement()
        {
            using var app = Application.AttachOrLaunch(ExeFileName, "ListViewWindow");
            var window   = app.MainWindow;
            var listView = window.FindListView();

            Assert.IsInstanceOf <ListView>(UiElement.FromAutomationElement(listView.AutomationElement));
        }
        public void Find()
        {
            using var app = Application.Launch(ExeFileName, "PasswordBoxWindow");
            var window      = app.MainWindow;
            var passwordBox = window.FindPasswordBox();

            Assert.IsInstanceOf <PasswordBox>(UiElement.FromAutomationElement(passwordBox.AutomationElement));
        }
Пример #16
0
        public void Find()
        {
            using var app = Application.AttachOrLaunch(ExeFileName, "SingleDataGridWindow");
            var window   = app.MainWindow;
            var dataGrid = window.FindDataGrid();

            Assert.IsInstanceOf <DataGrid>(UiElement.FromAutomationElement(dataGrid.AutomationElement));
        }
Пример #17
0
        public void Find()
        {
            using var app = Application.Launch(ExeFileName, "FrameWindow");
            var window = app.MainWindow;
            var frame  = window.FindFrame();

            Assert.IsInstanceOf <Frame>(UiElement.FromAutomationElement(frame.AutomationElement));
        }
Пример #18
0
 public void FromAutomationElement()
 {
     using (var app = Application.Launch(ExeFileName, "TreeViewWindow"))
     {
         var window   = app.MainWindow;
         var treeView = window.FindTreeView();
         Assert.IsInstanceOf <TreeView>(UiElement.FromAutomationElement(treeView.AutomationElement));
     }
 }
Пример #19
0
        public void Find()
        {
            using var app = Application.AttachOrLaunch(ExeFileName, "CalendarWindow");
            var window   = app.MainWindow;
            var calendar = window.FindCalendar();

            Assert.IsInstanceOf <Calendar>(UiElement.FromAutomationElement(calendar.AutomationElement));
            Assert.IsInstanceOf <CalendarDayButton>(UiElement.FromAutomationElement(calendar.Items[0].AutomationElement));
        }
Пример #20
0
 public void Find()
 {
     using (var app = Application.Launch(ExeFileName, "ToolBarWindow"))
     {
         var window  = app.MainWindow;
         var toolBar = window.FindToolBar();
         Assert.IsInstanceOf <ToolBar>(UiElement.FromAutomationElement(toolBar.AutomationElement));
     }
 }
Пример #21
0
        public void FindTextBox(string key)
        {
            using var app = Application.Launch(ExeFileName, "TextBoxWindow");
            var window  = app.MainWindow;
            var textBox = window.FindTextBox(key);

            Assert.AreEqual(true, textBox.IsEnabled);
            Assert.IsInstanceOf <TextBox>(UiElement.FromAutomationElement(textBox.AutomationElement));
        }
Пример #22
0
 public void Find()
 {
     using (var app = Application.AttachOrLaunch(ExeFileName, "MenuWindow"))
     {
         var window = app.MainWindow;
         var menu   = window.FindMenu();
         Assert.IsInstanceOf <Menu>(UiElement.FromAutomationElement(menu.AutomationElement));
     }
 }
Пример #23
0
        public void Find()
        {
            using var app = Application.Launch(ExeFileName, "DatePickerWindow");
            var window     = app.MainWindow;
            var datePicker = window.FindDatePicker();

            Assert.IsInstanceOf <DatePicker>(datePicker);
            Assert.IsInstanceOf <DatePicker>(UiElement.FromAutomationElement(datePicker.AutomationElement));
        }
        public void FindRadioButton(string key)
        {
            using var app = Application.AttachOrLaunch(ExeFileName, "RadioButtonWindow");
            var window      = app.MainWindow;
            var radioButton = window.FindRadioButton(key);

            Assert.AreEqual(true, radioButton.IsEnabled);
            Assert.IsInstanceOf <RadioButton>(UiElement.FromAutomationElement(radioButton.AutomationElement));
        }
Пример #25
0
 public void Find(string key)
 {
     using (var app = Application.AttachOrLaunch(ExeFileName, "ComboBoxWindow"))
     {
         var window   = app.MainWindow;
         var comboBox = window.FindComboBox(key);
         Assert.IsInstanceOf <ComboBox>(UiElement.FromAutomationElement(comboBox.AutomationElement));
     }
 }
Пример #26
0
        public void FindTextBlock(string key, string expected)
        {
            using var app = Application.AttachOrLaunch(ExeFileName, "TextBlockWindow");
            var window    = app.MainWindow;
            var textBlock = window.FindTextBlock(key);

            Assert.AreEqual(expected, textBlock.Text);
            Assert.IsInstanceOf <TextBlock>(UiElement.FromAutomationElement(textBlock.AutomationElement));
        }
Пример #27
0
 public void Find()
 {
     using (var app = Application.Launch(ExeFileName, "SeparatorWindow"))
     {
         var window    = app.MainWindow;
         var separator = window.FindSeparator();
         Assert.IsInstanceOf <Separator>(UiElement.FromAutomationElement(separator.AutomationElement));
     }
 }
Пример #28
0
        public void FindGroupBox(string key, string header)
        {
            using var app = Application.AttachOrLaunch(ExeFileName, WindowName);
            var window   = app.MainWindow;
            var groupBox = window.FindGroupBox(key);

            Assert.AreEqual(header, groupBox.HeaderText);
            Assert.NotNull(groupBox.FindTextBlock());
            Assert.IsInstanceOf <GroupBox>(UiElement.FromAutomationElement(groupBox.AutomationElement));
        }
Пример #29
0
        public void FindExpander(string key, string header)
        {
            using var app = Application.AttachOrLaunch(ExeFileName, WindowName);
            var window   = app.MainWindow;
            var expander = window.FindExpander(key);

            Assert.AreEqual(header, expander.HeaderText);
            Assert.NotNull(expander.FindTextBlock());
            Assert.IsInstanceOf <Expander>(UiElement.FromAutomationElement(expander.AutomationElement));
        }
Пример #30
0
        public void FindLabel(string key, string header)
        {
            using var app = Application.AttachOrLaunch(ExeFileName, "LabelWindow");
            var window = app.MainWindow;
            var label  = window.FindLabel(key);

            Assert.AreEqual(header, label.Text);
            Assert.NotNull(label.FindTextBlock());
            Assert.IsInstanceOf <Label>(UiElement.FromAutomationElement(label.AutomationElement));
        }