public void UsuarioAutenticado(int navegador, string login = null, string password = null, string screenShotName = null)
        {
            try
            {
                switch (navegador)
                {
                case Navegadores.GoogleChrome:
                    wd = new ChromeDriver();
                    break;

                case Navegadores.Firefox:
                    wd = new FirefoxDriver();
                    break;

                default:
                    break;
                }

                log            = new LoginPage(wd);
                mc             = new MetodosComuns(wd);
                evidenciaTeste = new TestEvidence(wd);

                log.GoTo();
                log.Logar(login, password);

                log.verificaURL("https://mantis-prova.base2.com.br/my_view_page.php");
                log.verificarTitulo("My View - MantisBT");
                evidenciaTeste.Capture(screenShotName);
                mc.Fechar();
            }
            catch (Exception)
            {
                throw;
            }
        }
        public void AcessoNegado(int navegador, string login = null, string password = null, string screenShotName = null)
        {
            try
            {
                switch (navegador)
                {
                case Navegadores.GoogleChrome:
                    wd = new ChromeDriver();
                    break;

                case Navegadores.Firefox:
                    wd = new FirefoxDriver();
                    break;

                default:
                    break;
                }

                log            = new LoginPage(wd);
                mc             = new MetodosComuns(wd);
                evidenciaTeste = new TestEvidence(wd);

                log.GoTo();
                log.Logar(login, password);

                mc.Valida("Your account may be disabled or blocked or the username/password you entered is incorrect.");
                evidenciaTeste.Capture(screenShotName);
                mc.Fechar();
            }
            catch (Exception)
            {
                throw;
            }
        }
        public void AtribuirProjetoBs2(int navegador, string login, string password, string NumeroNaoAtribuido, string adiconarTag, string adicionarNotaDoProblema, string screenShotName)
        {
            try
            {
                switch (navegador)
                {
                case Navegadores.GoogleChrome:
                    wd = new ChromeDriver();
                    break;

                case Navegadores.Firefox:
                    wd = new FirefoxDriver();
                    break;

                default:
                    break;
                }

                log             = new LoginPage(wd);
                mc              = new MetodosComuns(wd);
                paginaInicial   = new HomePage(wd);
                detalhesProjeto = new UnassignedPage(wd);
                evidenciaTeste  = new TestEvidence(wd);

                log.GoTo();
                log.Logar(login, password);
                paginaInicial.irParaNaoAtribuido(NumeroNaoAtribuido);
                detalhesProjeto.ValidaDirecionamentoTela(NumeroNaoAtribuido);
                detalhesProjeto.PreencherFormulario(adiconarTag);
                detalhesProjeto.anexarArquivo();
                detalhesProjeto.adicionarNota(adicionarNotaDoProblema);
                evidenciaTeste.Capture(screenShotName);


                mc.Fechar();
            }
            catch (Exception)
            {
                throw;
            }
        }
예제 #4
0
        public void InserirDetalhesRelatorioComSucesso(int navegador, string login, string password, string categoria, string reprodutibilidade, string gravidade, string prioridade, string selecionarPerfil, string summary, string description, string screenShotName)
        {
            try
            {
                switch (navegador)
                {
                case Navegadores.GoogleChrome:
                    wd = new ChromeDriver();
                    break;

                case Navegadores.Firefox:
                    wd = new FirefoxDriver();
                    break;

                default:
                    break;
                }

                log              = new LoginPage(wd);
                paginaInicial    = new HomePage(wd);
                reportarProblema = new ReportIssuePage(wd);
                mc             = new MetodosComuns(wd);
                evidenciaTeste = new TestEvidence(wd);

                log.GoTo();
                log.Logar(login, password);
                paginaInicial.irParaInserirDetalhesRelatorio();
                reportarProblema.inserirDetalhesRelatorio(categoria, reprodutibilidade, gravidade, prioridade, selecionarPerfil);
                reportarProblema.camposObg(summary, description);
                reportarProblema.ClicarEnviarRelatorio();
                mc.Valida("Operation successful.");

                evidenciaTeste.Capture(screenShotName);
                mc.Fechar();
            }
            catch (Exception)
            {
                throw;
            }
        }
예제 #5
0
        public void deixardePreenchercamposObrigatorios(int navegador, string login, string password, string screenShotName, string summary = null, string description = null)
        {
            try
            {
                switch (navegador)
                {
                case Navegadores.GoogleChrome:
                    wd = new ChromeDriver();
                    break;

                case Navegadores.Firefox:
                    wd = new FirefoxDriver();
                    break;

                default:
                    break;
                }

                log              = new LoginPage(wd);
                paginaInicial    = new HomePage(wd);
                reportarProblema = new ReportIssuePage(wd);
                mc             = new MetodosComuns(wd);
                evidenciaTeste = new TestEvidence(wd);

                log.GoTo();
                log.Logar(login, password);
                paginaInicial.irParaInserirDetalhesRelatorio();
                reportarProblema.camposObg(summary, description);
                reportarProblema.ClicarEnviarRelatorio();
                mc.Valida("A necessary field  was empty. Please recheck your inputs.");

                evidenciaTeste.Capture(screenShotName);
                mc.Fechar();
            }
            catch (Exception)
            {
                throw;
            }
        }