public void Setup()
        {
            myViewPage            = new MyViewPage();
            manageProjPage        = new ManageProjPage();
            manageProjCatEditPage = new ManageProjCatEditPage();

            projectsDBSteps = new ProjectsDBSteps();

            loginFlows = new LoginFlows();

            loginFlows.EfetuarLogin(BuilderJson.ReturnParameterAppSettings("USER_LOGIN_PADRAO"), BuilderJson.ReturnParameterAppSettings("PASSWORD_LOGIN_PADRAO"));
        }
        public void Setup()
        {
            myViewPage          = new MyViewPage();
            accountProfEditPage = new AccountProfEditPage();
            manageProfMenuPage  = new ManageProfMenuPage();

            usersDBSteps = new UsersDBSteps();

            loginFlows = new LoginFlows();

            loginFlows.EfetuarLogin(BuilderJson.ReturnParameterAppSettings("USER_LOGIN_PADRAO"), BuilderJson.ReturnParameterAppSettings("PASSWORD_LOGIN_PADRAO"));
        }
        public void Setup()
        {
            myViewPage                = new MyViewPage();
            manageCustomFieldPage     = new ManageCustomFieldPage();
            manageCustomFieldEditPage = new ManageCustomFieldEditPage();

            customFieldDBSteps = new CustomFieldDBSteps();

            loginFlows = new LoginFlows();

            loginFlows.EfetuarLogin(BuilderJson.ReturnParameterAppSettings("USER_LOGIN_PADRAO"), BuilderJson.ReturnParameterAppSettings("PASSWORD_LOGIN_PADRAO"));
        }
Esempio n. 4
0
        public void Setup()
        {
            mainPage       = new MyViewPage();
            manageTagsPage = new ManageTagsPage();
            tagUpdatePage  = new TagUpdatePage();
            tagViewPage    = new TagViewPage();

            tagsDBSteps = new TagsDBSteps();

            loginFlows      = new LoginFlows();
            manageTagsFlows = new ManageTagsFlows();

            loginFlows.EfetuarLogin(BuilderJson.ReturnParameterAppSettings("USER_LOGIN_PADRAO"), BuilderJson.ReturnParameterAppSettings("PASSWORD_LOGIN_PADRAO"));
        }
Esempio n. 5
0
        public void RealizarLoginComSucessoComJavaScript()
        {
            #region Parameters
            string username = BuilderJson.ReturnParameterAppSettings("USER_LOGIN_PADRAO");
            string password = BuilderJson.ReturnParameterAppSettings("PASSWORD_LOGIN_PADRAO");
            #endregion

            #region Actions
            loginPage.PreencherUsuarioComJavaScript(username);
            loginPage.ClicarEmLoginComJavaScript();
            loginPage.PreencherSenhaComJavaScript(password);
            loginPage.ClicarEmLoginComJavaScript();
            #endregion

            #region Validations
            Assert.AreEqual(username, myViewPage.RetornaUsernameDasInformacoesDeLogin(), "O usuário retornado não é o esperado.");
            #endregion
        }
Esempio n. 6
0
        public void RealizarLoginSemInformarSenha()
        {
            #region Parameters
            string username = BuilderJson.ReturnParameterAppSettings("USER_LOGIN_PADRAO");

            //Resultado Esperado
            string messageErrorExpected = "Sua conta pode estar desativada ou bloqueada ou o nome de usuário e a senha que você digitou não estão corretos.";
            #endregion

            #region Actions
            loginPage.PreencherUsuario(username);
            loginPage.ClicarEmLogin();
            loginPage.ClicarEmLogin();
            #endregion

            #region Validations
            Assert.AreEqual(messageErrorExpected, loginPage.RetornaMensagemDeErro(), "A mensagem retornada não é a esperada.");
            #endregion
        }
Esempio n. 7
0
        protected void Click(By locator)
        {
            Stopwatch timeOut = new Stopwatch();

            timeOut.Start();

            while (timeOut.Elapsed.Seconds <= Convert.ToInt32(BuilderJson.ReturnParameterAppSettings("DEFAULT_TIMEOUT_IN_SECONDS")))
            {
                try
                {
                    WaitForElement(locator).Click();
                    timeOut.Stop();
                    ExtentReportHelpers.AddTestInfo(3, "");
                    return;
                }
                catch (System.Reflection.TargetInvocationException)
                {
                }
                catch (StaleElementReferenceException)
                {
                }
                catch (System.InvalidOperationException)
                {
                }
                catch (WebDriverException e)
                {
                    if (e.Message.Contains("Other element would receive the click"))
                    {
                        continue;
                    }

                    if (e.Message.Contains("Element is not clickable at point"))
                    {
                        continue;
                    }

                    throw e;
                }
            }

            throw new Exception("Given element isn't visible");
        }
Esempio n. 8
0
        public void RealizarLogoffComSucesso()
        {
            #region Parameters
            string username = BuilderJson.ReturnParameterAppSettings("USER_LOGIN_PADRAO");
            string password = BuilderJson.ReturnParameterAppSettings("PASSWORD_LOGIN_PADRAO");

            //Resultado esperado
            string urlExpected = "login_page.php";
            #endregion

            #region Actions
            loginPage.PreencherUsuario(username);
            loginPage.ClicarEmLogin();
            loginPage.PreencherSenha(password);
            loginPage.ClicarEmLogin();
            myViewPage.ClicarUsuarioInfo();
            myViewPage.ClicarSair();
            #endregion

            #region Validations
            StringAssert.Contains(urlExpected, loginPage.GetURL(), "A página atual não é a esperada.");
            #endregion
        }
 public void Setup()
 {
     ExtentReportHelpers.AddTest();
     DriverFactory.CreateInstance();
     DriverFactory.INSTANCE.Navigate().GoToUrl(BuilderJson.ReturnParameterAppSettings("DEFAULT_APPLICATION_URL"));
 }
Esempio n. 10
0
 public PageBase()
 {
     wait       = new OpenQA.Selenium.Support.UI.WebDriverWait(DriverFactory.INSTANCE, TimeSpan.FromSeconds(Convert.ToInt32(BuilderJson.ReturnParameterAppSettings("DEFAULT_TIMEOUT_IN_SECONDS"))));
     driver     = DriverFactory.INSTANCE;
     javaScript = (IJavaScriptExecutor)driver;
 }