Beispiel #1
0
        public MainWindow()
        {
            this.InitializeComponent();
            App.AttachDevTools(this);
            MangaReader.Core.Client.Init();
            var processTest = new ProcessTest();

            processTest.StateChanged += ProcessTestOnStateChanged;
            Task.Run(() => MangaReader.Core.Client.Start(processTest));
            explorer         = new ExplorerViewModel();
            this.DataContext = explorer;
        }
Beispiel #2
0
 void ProcessTest_Tick(object sender, System.EventArgs e)
 {
     if (_MinsToRun == 0)
     {
         ProcessTest.Enabled = false;
         ProcessTest.Stop();
         _KeepRunning = false;
     }
     else
     {
         _MinsToRun--;
     }
 }
Beispiel #3
0
 public ContextMain()
 {
     ProcessTests = new ProcessTest[]
     {
         new ProcessTest()
         {
             Name = "Pause", Data = new TestPause()
         },
         new ProcessTest()
         {
             Name = "Annuler", Data = new TestCancel()
         },
     };
 }
Beispiel #4
0
 public void Post([FromBody] ProcessTest request)
 {
     Startup.data.Add(Guid.NewGuid().ToString(), request);
 }
Beispiel #5
0
        public void SetupTest()
        {
            TipoBrowser = "CHROME";
            processTest = new ProcessTest();
            InternetExplorerDriverService IEService = null;
            ChromeDriverService           ChService = null;

            if (TipoBrowser == "IE")
            {
                var options = new InternetExplorerOptions();
            }
            else
            {
                var options = new ChromeOptions();
            }

            var os = Environment.OSVersion;

            OSLinux = os.Platform == PlatformID.Unix;
            if (OSLinux)
            {
                PathChromeDriver = "/usr/bin/";
                if (TipoBrowser == "IE")
                {
                    IEService = InternetExplorerDriverService.CreateDefaultService(PathChromeDriver, "IEDriverServer");
                }
                else
                {
                    ChService = ChromeDriverService.CreateDefaultService(PathChromeDriver, "chromedriver");
                }
            }
            else
            {
                PathChromeDriver = @"C:\Projetos\CCMNetCore02\CCMNetCore02\bin\Debug\netcoreapp2.1";
                if (TipoBrowser == "IE")
                {
                    IEService = InternetExplorerDriverService.CreateDefaultService(PathChromeDriver, "IEDriverServer.exe");
                }
                else
                {
                    ChService = ChromeDriverService.CreateDefaultService(PathChromeDriver, "chromedriver.exe");
                }

                //IWebDriver driver = new InternetExplorerDriver(@"C:\Projetos\CCMNetCore02\CCMNetCore02\bin\Debug\netcoreapp2.1\IEDriverServer.exe");
                //driver.Navigate().GoToUrl("http://www.google.com");
            }


            //processTest.CustomerName = "marisa"; //CustomerName evitar Acentuacao e espa�o
            //processTest.SuiteName = "ccm"; //CustomerName evitar Acentuacao e espa�o
            //processTest.ScenarioName = "cadastroaposentado";
            //processTest.ReportID = 271;

            if (TipoBrowser == "IE")
            {
                var options = new InternetExplorerOptions();
                driver = new InternetExplorerDriver(IEService, options);
            }
            else
            {
                var options = new ChromeOptions();
                if (OSLinux)
                {
                    options.AddArgument("--headless");
                    //options.AddArgument("--no-sandbox");
                    //options.AddArgument("--disable-dev-shm-usage");
                    //options.AddArgument("--touch-events=enabled");
                    //options.AddArgument("start-maximized");
                    //options.EnableMobileEmulation("iPhone 5/SE");
                }
                driver = new ChromeDriver(ChService, options);
            }

            //baseURL = "https://ccmhomolog.marisa.com.br/psfsecurity/paginas/security/login/tela/login.html";
            baseURL            = "https://pagseguro.uol.com.br/";
            verificationErrors = new StringBuilder();


            //// Executar testes em background
            //var options = new ChromeOptions();
            //options.AddArguments(new List<string>() { "headless" });
            //options.AddArgument("--touch-events=enabled");
            //options.AddArgument("start-maximized");
            //options.EnableMobileEmulation("iPhone 5/SE");
            //options.AddArgument("--disable-plugins");
            //var chromeDriverService = ChromeDriverService.CreateDefaultService();
            //driver = new ChromeDriver(chromeDriverService, options);


            //// Executar teste com browser aberto Chrome
            //ChromeOptions options = new ChromeOptions();
            //options.AddArgument("--touch-events=enabled");
            //options.AddArgument("--no-sandbox");
            //options.AddArgument("--disable-dev-shm-usage");
            //options.AddArgument("start-maximized");
            //options.EnableMobileEmulation("iPhone 5/SE");
            //driver = new ChromeDriver(@"C:\MARISA\CCM\NUnit_NetCore\NUnit_NetCore\bin\Debug\netcoreapp2.1", options);
            //driver.Manage().Window.Maximize();
            //baseURL = "https://ccmhomolog.marisa.com.br/psfsecurity/paginas/security/login/tela/login.html";
            //verificationErrors = new StringBuilder();
        }