public String EditarProfile()
        {
            SeleniumMaps  Maps        = new SeleniumMaps();
            WebDriverWait espera      = new WebDriverWait(DriverFactory.INSTANCE, TimeSpan.FromSeconds(5));
            GerarRandom   gerarRandom = new GerarRandom();
            String        conteudo    = gerarRandom.RandomString();

            //método try catch para validar se foi possível acessar a tela inicial
            try
            {
                // Assert.AreEqual("Edit Account", _driver.FindElement(By.XPath("//form/table/tbody/tr/td")).Text);
                Maps.ClicarBotao(rBEdit);
                Maps.ClicarBotao(btSubmit);

                Maps.PreencherCampo(tfPlataform, "", conteudo);
                Maps.PreencherCampo(tfOs, "", conteudo);
                Maps.PreencherCampo(tfOsBuild, "", conteudo);

                Maps.ClicarBotao(btUpdateProfileEdicao);
            }
            catch (Exception e)
            {
                NUnit.Framework.Assert.Fail(e.ToString());
            }

            return(conteudo);
        }
Exemplo n.º 2
0
        public String PegarIssueInserida(String summary)
        {
            //Após inserir uma issue aparece uma tela rapidamente informando o ID da issue

            WebDriverWait espera = new WebDriverWait(DriverFactory.INSTANCE, TimeSpan.FromSeconds(3));
            SeleniumMaps  Maps   = new SeleniumMaps();
            String        ID     = "";

            try
            {
                Maps.ClicarBotao(LtViewIssues, "");
                Maps.LimparCampo(tfSearch);
                Maps.PreencherCampo(tfSearch, "", summary);
                Maps.ClicarBotao(btFilter, "");
                Maps.ClicarBotao(btPicFilter, "");


                String URL = DriverFactory.INSTANCE.Url; //pegar a URL
                ID = URL.Substring(URL.Length - 4);      //tratamento da URL que contem o ID
            }
            catch (Exception e)
            {
            }



            return(ID);
        }
Exemplo n.º 3
0
        public void InserirIssue_Simple(string category, string reproducibility, string severity, string priority, string summary, string description)
        {
            WebDriverWait espera = new WebDriverWait(DriverFactory.INSTANCE, TimeSpan.FromSeconds(3));
            SeleniumMaps  Maps   = new SeleniumMaps();


            //dinamico
            Maps.CBClick(cbCategory, "category_id", category);
            Maps.CBClick(cbReproducibility, "reproducibility", reproducibility);
            Maps.CBClick(cbSeverity, "severity", severity);
            Maps.CBClick(cbPriority, "priority", priority);
            Maps.PreencherCampo(tfSummary, "summary", summary);
            Maps.PreencherCampo(tfdDescription, "description", description);

            //estático

            Maps.CBClick(cbProfile, "profile_id", "Desktop Windows 10");
            Maps.PreencherCampo(tfPlatform, "platform", "teste1");
            Maps.PreencherCampo(tfOs, "os", "teste2");
            Maps.PreencherCampo(tfOs_Build, "os_build", "teste3");
            Maps.CBClick(cbHandler, "handler_id", "administrator");
            Maps.PreencherCampo(tfSteps, "steps_to_reproduce", "teste4");
            Maps.PreencherCampo(tfAdditional, "additional_info", "teste4");


            DriverFactory.INSTANCE.FindElement(By.XPath("(//input[@name='view_state'])[2]")).Click();
            DriverFactory.INSTANCE.FindElement(By.Name("view_state")).Click();
            DriverFactory.INSTANCE.FindElement(By.XPath("//input[@value='Submit Report']")).Click();
        }
Exemplo n.º 4
0
        public String InserirTarefa_RetornoSummary()
        {
            WebDriverWait espera      = new WebDriverWait(DriverFactory.INSTANCE, TimeSpan.FromSeconds(3));
            SeleniumMaps  Maps        = new SeleniumMaps();
            GerarRandom   gerarRandom = new GerarRandom();
            String        summary     = gerarRandom.RandomString();


            Maps.CBClick(cbCategory, "category_id", "[All Projects] app_14");
            Maps.CBClick(cbReproducibility, "reproducibility", "N/A");
            Maps.CBClick(cbPriority, "priority", "none");

            Maps.PreencherCampo(tfPlatform, "platform", "teste1");
            Maps.PreencherCampo(tfOs, "os", "teste2");
            Maps.PreencherCampo(tfOs_Build, "os_build", "teste3");
            Maps.CBClick(cbHandler, "handler_id", "administrator");
            Maps.PreencherCampo(tfSummary, "summary", summary);
            Maps.PreencherCampo(tfdDescription, "description", "teste4");
            Maps.PreencherCampo(tfSteps, "steps_to_reproduce", "teste4");
            Maps.PreencherCampo(tfAdditional, "additional_info", "teste4");
            Maps.ClicarBotao(btSubmit);


            return(summary);
        }
Exemplo n.º 5
0
        public void InserirTarefa()
        {
            WebDriverWait espera = new WebDriverWait(DriverFactory.INSTANCE, TimeSpan.FromSeconds(3));
            SeleniumMaps  Maps   = new SeleniumMaps();


            Maps.CBClick(cbCategory, "category_id", "[All Projects] app_14");
            Maps.CBClick(cbReproducibility, "reproducibility", "always");
            Maps.CBClick(cbSeverity, "severity", "feature");
            Maps.CBClick(cbSeverity, "priority", "none");
            Maps.CBClick(cbSeverity, "profile_id", "Desktop Windows 10");
            Maps.PreencherCampo(tfPlatform, "platform", "teste1");
            Maps.PreencherCampo(tfOs, "os", "teste2");
            Maps.PreencherCampo(tfOs_Build, "os_build", "teste3");
            Maps.CBClick(cbHandler, "handler_id", "administrator");
            Maps.PreencherCampo(tfSummary, "summary", "TESTE_SUMMARY");
            Maps.PreencherCampo(tfdDescription, "description", "teste4");
            Maps.PreencherCampo(tfSteps, "steps_to_reproduce", "teste4");
            Maps.PreencherCampo(tfAdditional, "additional_info", "teste4");



            DriverFactory.INSTANCE.FindElement(By.XPath("(//input[@name='view_state'])[2]")).Click();
            DriverFactory.INSTANCE.FindElement(By.Name("view_state")).Click();
            DriverFactory.INSTANCE.FindElement(By.XPath("//input[@value='Submit Report']")).Click();
        }
Exemplo n.º 6
0
        public void InserirUserName_Email(String Email, String Username)
        {
            //implementar

            SeleniumMaps Maps = new SeleniumMaps();

            //método try catch para validar se foi possível acessar a tela inicial
            try
            {
                Maps.PreencherCampo(tfUsername, "", Username);
                Maps.PreencherCampo(tfEmail, "", Email);
                Maps.ClicarBotao(btSubmit, "");
            }
            catch (Exception e)
            {
                Assert.Fail(e.ToString());
            }
        }
        public void Login()
        {
            //implementar

            SeleniumMaps Maps = new SeleniumMaps();



            //método try catch para validar se foi possível acessar a tela inicial
            try
            {
                Maps.PreencherCampo(tfUsername, "username", username);
                Maps.PreencherCampo(tfPassword, "password", password);
                Maps.ClicarBotao(btSubmit, "//input[@value='Login']");
            }
            catch (Exception e)
            {
                Assert.Fail(e.ToString());
            }
        }
        public void PreencheParametros3()
        {
            SeleniumMaps  Maps   = new SeleniumMaps();
            WebDriverWait espera = new WebDriverWait(DriverFactory.INSTANCE, TimeSpan.FromSeconds(5));

            //método try catch para validar se foi possível acessar a tela inicial
            try
            {
                Maps.PreencherCampo(tfPlataform, "", "A");
                Maps.PreencherCampo(tfOs, "", "A");
                Maps.PreencherCampo(tfOsBuild, "", "");
            }


            catch (Exception e)
            {
                NUnit.Framework.Assert.Fail(e.ToString());
            }

            //"A necessary field \"Platform\" was empty. Please recheck your inputs."
        }
Exemplo n.º 9
0
        public void ProcurarIssue(string ID)
        {
            SeleniumMaps Maps = new SeleniumMaps();

            try
            {
                Maps.PreencherCampo(tfBugId, "", ID);
                Maps.ClicarBotao(btJump);
                //Assert.AreEqual("A number was expected for bug_id.", _driver.FindElement(By.XPath("//p")).Text);
            }
            catch (Exception e)
            {
            }
        }
Exemplo n.º 10
0
        public void InserirCategoriaDuplicada(String categoria)
        {
            SeleniumMaps  Maps   = new SeleniumMaps();
            WebDriverWait espera = new WebDriverWait(DriverFactory.INSTANCE, TimeSpan.FromSeconds(5));

            //método try catch para validar se foi possível acessar a tela inicial
            try
            {
                Maps.PreencherCampo(tfCategory, "", categoria);
                Maps.ClicarBotao(btAddCategory);


                Maps.PreencherCampo(tfCategory, "", categoria); //inserindo a recem inserida
                Maps.ClicarBotao(btAddCategory);



                Maps.VerificarItem(txtErroCategory, "A category with that name already exists.", "");
            }
            catch (Exception e)
            {
                NUnit.Framework.Assert.Fail(e.ToString());
            }
        }
Exemplo n.º 11
0
        /// <summary>
        /// Método para verificar o acesso á Página Inicial
        /// </summary>



        public void WrongLogin()
        {
            //implementar

            SeleniumMaps Maps     = new SeleniumMaps();
            String       username = "******";
            String       password = "";



            //método try catch para validar se foi possível acessar a tela inicial
            try
            {
                Maps.PreencherCampo(tfUsername, "username", username);
                Maps.PreencherCampo(tfPassword, "password", password);
                Maps.ClicarBotao(btSubmit, "//input[@value='Login']");
                //Assert.AreEqual("account may be disabled", _driver.FindElement(By.CssSelector("//font")).Text);
                Maps.VerificarItem(txtWrongLogin, "Your account may be disabled or blocked or the username/password you entered is incorrect.", "");
            }
            catch (Exception e)
            {
                Assert.Fail(e.ToString());
            }
        }
Exemplo n.º 12
0
        public void AtribuirNota(String nota)
        {
            WebDriverWait espera = new WebDriverWait(DriverFactory.INSTANCE, TimeSpan.FromSeconds(3));
            SeleniumMaps  Maps   = new SeleniumMaps();
            String        ID     = "";

            try
            {
                //Maps.CBClick(cbStatus, "status", status);
                //revisar funcao do combobox
                Maps.PreencherCampo(tfBugNote, "", nota);
            }
            catch (Exception e)
            {
            }
        }
Exemplo n.º 13
0
        public void InserirSenha()
        {
            SeleniumMaps  Maps   = new SeleniumMaps();
            WebDriverWait espera = new WebDriverWait(DriverFactory.INSTANCE, TimeSpan.FromSeconds(5));

            //método try catch para validar se foi possível acessar a tela inicial
            try
            {
                Maps.PreencherCampo(tfPassword, "", LoginPageObjects.username);
                Maps.ClicarBotao(btConfirmPassword);
            }
            catch (Exception e)
            {
                NUnit.Framework.Assert.Fail(e.ToString());
            }
        }
Exemplo n.º 14
0
        public void InserirCategoriaVazia(String categoria)
        {
            SeleniumMaps  Maps   = new SeleniumMaps();
            WebDriverWait espera = new WebDriverWait(DriverFactory.INSTANCE, TimeSpan.FromSeconds(5));

            //método try catch para validar se foi possível acessar a tela inicial
            try
            {
                Maps.PreencherCampo(tfCategory, "", categoria);
                Maps.ClicarBotao(btAddCategory);
                Maps.VerificarItem(txtErroCategory, "A necessary field \"Category\" was empty. Please recheck your inputs.", "");
            }
            catch (Exception e)
            {
                NUnit.Framework.Assert.Fail(e.ToString());
            }
        }
        public void FiltrarSemRetorno()
        {
            SeleniumMaps  Maps   = new SeleniumMaps();
            WebDriverWait espera = new WebDriverWait(DriverFactory.INSTANCE, TimeSpan.FromSeconds(5));

            //método try catch para validar se foi possível acessar a tela inicial
            try
            {
                Maps.PreencherCampo(tfSearch, "*", "*");
                Maps.ClicarBotao(btFilter, "");

                Maps.VerificarItem(bugList, "Viewing Issues (0 - 0 / 0)", "");
            }
            catch (Exception e)
            {
                NUnit.Framework.Assert.Fail(e.ToString());
            }
        }
Exemplo n.º 16
0
        public void AcessarEdicaoIssue(String summary)
        {
            //Após inserir uma issue aparece uma tela rapidamente informando o ID da issue

            WebDriverWait espera = new WebDriverWait(DriverFactory.INSTANCE, TimeSpan.FromSeconds(3));
            SeleniumMaps  Maps   = new SeleniumMaps();
            String        ID     = "";

            try
            {
                Maps.ClicarBotao(LtViewIssues, "");
                Maps.LimparCampo(tfSearch);
                Maps.PreencherCampo(tfSearch, "", summary);
                Maps.ClicarBotao(btFilter, "");
                Maps.ClicarBotao(btPicFilter, "");
            }
            catch (Exception e)
            {
            }
        }