Esempio n. 1
0
        public void Instanciador()
        {
            try
            {
                var chromeOptions = new ChromeOptions();
                chromeOptions.AddArguments("headless");
                chromeOptions.AddArguments("window-size=1920x1080");

                driver = new ChromeDriver(chromeOptions);//chromeOption

                objRep = ObjectRepositoryUtils.Instance;
                objRep.TestDataReader("ObjectRepository.csv");
                dataRep = TestDataUtils.Instance;
                dataRep.testDataReader("DataRepository.csv");
                ofertaActions     = new OfertaActions();
                ofertaCondition   = new OfertaConditions();
                productoActions   = new ProductoActions();
                productoCondition = new ProductoConditions();
                commonActions     = new CommonActions();
                commonCondition   = new CommonConditions();
                randomString      = RandomString(15);
                BorradoScreenshots();

                driver.Navigate().GoToUrl("https://ufinetprep2.crm4.dynamics.com/");
                driver.Manage().Window.Position = new System.Drawing.Point(-1000, 100);
                driver.Manage().Window.Maximize();
                driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(45);

                TestContext.WriteLine("Instanciador iniciado correctamente");
                TestContext.WriteLine("-------------------- - ");
            } catch (Exception e) {
                TestContext.WriteLine("Error al iniciar el instaciador : " + e);
                throw e;
            }
        }
Esempio n. 2
0
        public void Instanciador()
        {
            // Instanciador del driver
            utils.Instanciador();

            driver            = Utils.driver;
            ofertaActions     = Utils.GetOfertaActions();
            ofertaCondition   = Utils.GetOfertaConditions();
            productoActions   = Utils.GetProductoActions();
            productoCondition = Utils.GetProductoConditions();
            commonActions     = Utils.GetCommonActions();
            commonCondition   = Utils.GetCommonConditions();

            // Realizar login
            commonActions.Login();
        }