Example #1
0
        public static void Setup(TestContext context)
        {
            try
            {
                DeleteProductionFiles();
            }
            catch { }

            _winAppDriver.StartInfo.UseShellExecute = true;
            _winAppDriver.StartInfo.FileName        = _winAppDriverPath;
            _winAppDriver.StartInfo.Verb            = "runas";
            _winAppDriver.Start();

            //Desktop
            DesiredCapabilities _desktopCapabilities = new DesiredCapabilities();

            _desktopCapabilities.SetCapability("app", "Root");
            _desktopSession = new WindowsDriver <WindowsElement>(new Uri("http://127.0.0.1:4723"), _desktopCapabilities);
            _desktopSession.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(1.5));

            //Camtasia
            DesiredCapabilities _appCapabilities = new DesiredCapabilities();

            _appCapabilities.SetCapability("app", _editorPath);
            _camtasiaSession = new WindowsDriver <WindowsElement>(new Uri("http://127.0.0.1:4723"), _appCapabilities);
            _camtasiaSession.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(2.5));

            //Views
            _splashScreenView  = new SplashScreenView(_camtasiaSession);
            _welcomeWindowView = new WelcomeWindowView(_camtasiaSession);
            _mainWindowView    = new MainWindowView(_camtasiaSession);
            _recorderView      = new RecorderView(_desktopSession);
        }
Example #2
0
 public App()
 {
     if (Settings.Default["NameUser"].ToString() == string.Empty || Settings.Default["SurnameUser"].ToString() == string.Empty)
     {
         var welwindow = new WelcomeWindowView();
         welwindow.Show();
     }
     else
     {
         var mainwindow = new MainWindow();
         mainwindow.Show();
     }
 }