コード例 #1
0
        public void Login()
        {
            CommonLogic commonLogic = new CommonLogic();

            driver     = WebDriverSingleton.GetInstance();
            driver.Url = commonLogic.GetAppUrl();
            driver.Manage().Window.Maximize();

            IWebElement inputUser = driver.FindElement(By.Id("txtUsername"));

            inputUser.SendKeys("soporteit");
            IWebElement inputPassword = driver.FindElement(By.Id("txtPassword"));

            inputPassword.SendKeys("soporteit");
            inputPassword.SendKeys(Keys.Enter);
        }
コード例 #2
0
        public void SetUp()
        {
            //Inicialización de variables
            CommonLogic commonLogic = new CommonLogic();

            driver              = WebDriverSingleton.GetInstance();
            actions             = new Actions(driver);
            wait                = new WebDriverWait(driver, TimeSpan.FromSeconds(20));
            txtNombreExpected   = "InstituciónEducativa";
            txtNomCortoExpected = "InstituciónEducativa";
            txtPaisExpected     = "gt";

            //Ir a pantalla de Instituciones Educativas
            IWebElement applicacion = wait.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.ElementToBeClickable(By.XPath("//*[@id='menucenter']/a[2]")));

            applicacion.Click();
            IWebElement modulo = wait.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.ElementToBeClickable(By.XPath("/html/body/div[1]/div[4]/div[2]/div[2]/table[4]/tbody/tr/td/div[1]/div[2]/h2/a")));

            modulo.Click();
            IWebElement seccion = wait.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.ElementToBeClickable(By.XPath("/html/body/div[1]/div[4]/div[2]/div[2]/div[2]/fieldset/div/div[4]/div[1]/div[2]/h2/a")));

            seccion.Click();
            //IWebElement opcion = wait.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.ElementToBeClickable(By.XPath("//*[@id='innerright']/div[2]/fieldset[3]/div/div[1]/div[1]/div[2]/h2/a")));
        }
コード例 #3
0
        public void SetUp()
        {
            //Inicialización de variables
            CommonLogic commonLogic = new CommonLogic();

            driver  = WebDriverSingleton.GetInstance();
            actions = new Actions(driver);
            wait    = new WebDriverWait(driver, TimeSpan.FromSeconds(20));
            txtDescripcionExpected = "valor1";

            //Ir a pantalla de categorias de puesto
            IWebElement applicacion = wait.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.ElementToBeClickable(By.XPath("//*[@id='menucenter']/a[2]")));

            applicacion.Click();
            IWebElement modulo = wait.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.ElementToBeClickable(By.XPath("//*[@id='innerright']/table[1]/tbody/tr/td/div[1]/div[2]/h2/a")));

            modulo.Click();
            IWebElement seccion = wait.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.ElementToBeClickable(By.XPath("//*[@id='innerright']/div[2]/fieldset[3]/h4/a")));

            seccion.Click();
            IWebElement opcion = wait.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.ElementToBeClickable(By.XPath("//*[@id='innerright']/div[2]/fieldset[3]/div/div[1]/div[3]/div[2]/h2/a")));

            opcion.Click();
        }