public void VerificaStatus(String status) { WebDriverWait espera = new WebDriverWait(DriverFactory.INSTANCE, TimeSpan.FromSeconds(3)); SeleniumMaps Maps = new SeleniumMaps(); Maps.VerificarItem(txtStatus, status, ""); }
public void MyAccount_InserirProfile_Excluir() { //OSBUILD VAZIO //Insere um profile //edita //verifica se foi inserido HomePageObjects homePageObjects = new HomePageObjects(); LoginPageObjects loginPageObjects = new LoginPageObjects(); ReportIssuesPageObjects reportIssuesPageObjects = new ReportIssuesPageObjects(); MyAccountPageObjects myAccountPageObjects = new MyAccountPageObjects(); SeleniumMaps Maps = new SeleniumMaps(); loginPageObjects.Login(); homePageObjects.VerificarAcessaLogin(); homePageObjects.EscolherProjeto(ConfigurationManager.AppSettings["Projeto"].ToString()); homePageObjects.AcessarAbaMyAccount(); myAccountPageObjects.AcessarProfiles(); myAccountPageObjects.VerificaAcessoProfiles(); string conteudo = myAccountPageObjects.InserirProfile_Validar(); myAccountPageObjects.BotaoSubmeter(); conteudo = conteudo + " " + conteudo + " " + conteudo; myAccountPageObjects.VerificarInsercao(conteudo); myAccountPageObjects.Excluir(); myAccountPageObjects.VerificarExclusao(conteudo); Assert.Pass(); }
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); }
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); }
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(); }
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); }
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(); }
public void VerificaAtribuicaoSayoan() { SeleniumMaps Maps = new SeleniumMaps(); WebDriverWait espera = new WebDriverWait(DriverFactory.INSTANCE, TimeSpan.FromSeconds(5)); Maps.VerificarItem(txtVerificaAssignSayoan, "sayoan.oliveira", ""); }
public void VerificarExclusao(String conteudo) { 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 Maps.CBClick_ElementoAusente(cbProfile, "", conteudo); }
public void FiltrarIssue_Prioridade(String prioridade) { SeleniumMaps Maps = new SeleniumMaps(); Maps.ClicarBotao(ltFiltroPriority, ""); Maps.CBClick(cbPriority, prioridade, prioridade); Maps.ClicarBotao(btFilterPageFilter, ""); }
public void FiltrarIssue_Severity(String severity) { SeleniumMaps Maps = new SeleniumMaps(); Maps.ClicarBotao(ltFiltroSeverity, ""); Maps.CBClick(cbSeverity, "", severity); Maps.ClicarBotao(btFilterPageFilter, ""); }
public void Verifica_IssueVazia() { SeleniumMaps Maps = new SeleniumMaps(); Maps.VerificarItem(tfErro, "A number was expected for bug_id.", ""); //Assert.AreEqual("A number was expected for bug_id.", _driver.FindElement(By.XPath("//p")).Text); }
public void Excluir() { SeleniumMaps Maps = new SeleniumMaps(); WebDriverWait espera = new WebDriverWait(DriverFactory.INSTANCE, TimeSpan.FromSeconds(5)); Maps.CBClick(cbActionsIssues, "action", "Delete"); Maps.ClicarBotao(btOk); Maps.ClicarBotao(btConfirmDelete); }
public void AcessarAbaMyAccount() { SeleniumMaps Maps = new SeleniumMaps(); try { Maps.ClicarBotao(ltMyAccount, "My Account"); } catch (Exception e) { } }
public void Logout() { SeleniumMaps Maps = new SeleniumMaps(); try { Maps.ClicarBotao(ltLogout, ""); } catch (Exception e) { } }
public void AcessarAbaMyView() { SeleniumMaps Maps = new SeleniumMaps(); try { Maps.ClicarBotao(ltMyView, "My View"); } catch (Exception e) { } }
public void AtribuirSayoan() { SeleniumMaps Maps = new SeleniumMaps(); WebDriverWait espera = new WebDriverWait(DriverFactory.INSTANCE, TimeSpan.FromSeconds(5)); Maps.CBClick(cbActionsIssues, "action", "Assign"); Maps.ClicarBotao(btOk); Maps.CBClick(cbAssign, "assign", "sayoan.oliveira"); Maps.ClicarBotao(btConfirmAssign); }
public void ValidacaoIssueInexiste(string ID) { SeleniumMaps Maps = new SeleniumMaps(); try { String texto = "Issue " + ID + " not found."; Maps.VerificarItem(tfErro, texto, ""); //Assert.AreEqual("A number was expected for bug_id.", _driver.FindElement(By.XPath("//p")).Text); } catch (Exception e) { } }
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) { } }
public void Atualizar() { WebDriverWait espera = new WebDriverWait(DriverFactory.INSTANCE, TimeSpan.FromSeconds(3)); SeleniumMaps Maps = new SeleniumMaps(); try { Maps.ClicarBotao(btUpdate, ""); } catch (Exception e) { } }
public void SelecionarTudo() { 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 int indice = 2; //Numero de Issues //Pega o campo da tela e joga numa string //****DAQUI PRA BAIXO EXISTE ALTO RISCO DE ENCONTRAR UMA GAMBIRA**** String tamanho = txtQuantidadeIssues.Text; //sintaxe (0 - 0 / 0) String[] parts = tamanho.Split('/'); //separar em relação ao '/' String[] parts2 = parts[0].Split('-'); //pega a direita do '-' int NIssues = Convert.ToInt32(parts2[1]); //Casting explicito try { if (NIssues == 1) //quando tiver só um { //primeira linha é diferente Maps.ClicarBotao(checkboxIssue); } else if (NIssues > 1) { //quando tiver mais que um //primeira linha sempre é diferente Maps.ClicarBotao(checkboxIssue); NIssues++;//necessário para escolher o ultimo //percorre procurando um a um while (indice < NIssues) { DriverFactory.INSTANCE.FindElement(By.XPath("(//input[@name='bug_arr[]'])[" + indice + "]")).Click(); indice++; } } } catch (Exception e) { //NÃO EXISTEM TAREFAS PARA ATRIBUIR NUnit.Framework.Assert.Fail(e.ToString()); } }
public void AcessarAbaManage() { 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.ClicarBotao(ltManage, "Manage"); } catch (Exception e) { NUnit.Framework.Assert.Fail(e.ToString()); } }
public void VerificaAcessoViewIssues() { 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.VerificarItem(ltReporter, "Reporter:", ""); } catch (Exception e) { NUnit.Framework.Assert.Fail(e.ToString()); } }
public void VerificarLostPassword() { //implementar SeleniumMaps Maps = new SeleniumMaps(); //método try catch para validar se foi possível acessar a tela inicial try { Maps.VerificarItem(txtLostPassword, "Password Reset", ""); } catch (Exception e) { Assert.Fail(e.ToString()); } }
public void VerificaPrioridade(String Prioridade) { 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.VerificarItem(); } catch (Exception e) { } }
public void VerificaProjeto() { 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.CBClick(cbProjeto, "", ConfigurationManager.AppSettings["Projeto"].ToString()); //NUnit.Framework.Assert.AreEqual("Sayoan Oliveira's", _driver.FindElement(By.Name("project_id")).Text); } catch (Exception e) { NUnit.Framework.Assert.Fail(e.ToString()); } }
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) { } }
public void VerificarFeedbackErro1() { //implementar SeleniumMaps Maps = new SeleniumMaps(); //método try catch para validar se foi possível acessar a tela inicial try { Maps.VerificarItem(txtFalha1, "Invalid e-mail address.", ""); } catch (Exception e) { Assert.Fail(e.ToString()); } }
public void AcessarEdicaoIssue_TelaPosBuscarID() { //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(btEdit, ""); } catch (Exception e) { } }
public void AlterarStatus(String status) { 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.CBClick(cbStatus, "", status); } catch (Exception e) { } }