Exemplo n.º 1
0
        public AppDriver(string args, int timeoutMs)
        {
            _proc             = Process.Start(ExePath, args);
            _app              = new WindowsAppFriend(_proc);
            _mainWindowDriver = new MainWindowDriver(_app.Type <System.Windows.Application>().Current.MainWindow);

            WPFStandardControls_3.Injection(_app);
            WPFStandardControls_3_5.Injection(_app);
            WPFStandardControls_4.Injection(_app);
            WindowsAppExpander.LoadAssembly(_app, GetType().Assembly);

            _killer = new Killer(timeoutMs, _proc);
        }
Exemplo n.º 2
0
        public void コントロール特定3()
        {
            WindowsAppExpander.LoadAssembly(_app, GetType().Assembly);
            WPFStandardControls_3_5.Injection(_app);

            AppVar main        = _app.Type <Application>().Current.MainWindow;
            var    userControl = main.LogicalTree().ByType("WpfApplication.DemoSimpleControl").Single();
            var    elements    = _app.Type(GetType()).GetDemoSimpleControlElements(userControl);

            var textBlokX         = new WPFTextBlock(elements.TextBlockXName);
            var textBlokMail      = new WPFTextBlock(elements.TextBlockMail);
            var textBlokxLanguage = new WPFTextBlock(elements.TextBlockLanguage);

            var textBoxX          = new WPFTextBox(elements.TextBoxXName);
            var textBoxMail       = new WPFTextBox(elements.TextBoxMail);
            var comboBoxxLanguage = new WPFComboBox(elements.ComboBoxLanguage);
            var buttonOpen        = new WPFButtonBase(elements.ButtonOpen);
            var button1           = new WPFButtonBase(elements.Button1);
            var buttonA           = new WPFButtonBase(elements.ButtonA);
            var buttonCancel      = new WPFButtonBase(elements.ButtonCancel);
        }