Пример #1
0
        /*ESSA OPÇÃO AINDA NÃO ESTA DISPONÍVEL NO APP
         * public void ReordenaAtivosPlanilha()
         * {
         *  ESSA OPÇÃO AINDA NÃO ESTA DISPONÍVEL NO APP
         * }*/

        public void ExcluirAtivoPlanilha(string nomeDoAtivo)
        {
            MetodosComuns oMetodosComuns = new MetodosComuns();

            LoginCorreto();

            try
            {
                Thread.Sleep(2000);
                IWebElement elementoCapturado = oMetodosComuns.CapturaElementoDaLista(driver, nomeDoAtivo, "br.com.cedrotech.fastmobile.dev:id/quoteSimbol");

                espera.Until(ExpectedConditions.ElementToBeClickable(elementoCapturado));
                oMetodosComuns.HabilitaExclusaoAtivosDaPlanilha(driver, elementoCapturado);

                espera.Until(ExpectedConditions.ElementToBeClickable(btnExcluirAtivo));
                btnExcluirAtivo.Click();
            }
            catch
            {
                espera.Until(ExpectedConditions.ElementToBeClickable(btnAdicionaAtivo));
                btnAdicionaAtivo.Click();

                oMetodosComuns.AddAtivoNaPlanilhaCotacaoAtual(driver, nomeDoAtivo);

                Thread.Sleep(2000);
                IWebElement elementoCapturado = oMetodosComuns.CapturaElementoDaLista(driver, nomeDoAtivo, "br.com.cedrotech.fastmobile.dev:id/quoteSimbol");

                espera.Until(ExpectedConditions.ElementToBeClickable(elementoCapturado));
                oMetodosComuns.HabilitaExclusaoAtivosDaPlanilha(driver, elementoCapturado);

                espera.Until(ExpectedConditions.ElementToBeClickable(btnExcluirAtivo));
                btnExcluirAtivo.Click();
            }
        }
Пример #2
0
        public void TrocaPlanilhaCotacao(string nomePlanilha)
        {
            MetodosComuns oMetodosComuns = new MetodosComuns();

            LoginCorreto();

            Thread.Sleep(3000);

            espera.Until(ExpectedConditions.ElementToBeClickable(btnExpandirListas));
            btnExpandirListas.Click();

            try
            {
                IWebElement elementoCapturado = oMetodosComuns.CapturaElementoDaLista(driver, nomePlanilha, "br.com.cedrotech.fastmobile.dev:id/listName");

                espera.Until(ExpectedConditions.ElementToBeClickable(elementoCapturado));
                elementoCapturado.Click();
            }
            catch
            {
                espera.Until(ExpectedConditions.ElementToBeClickable(btnCriarNovaLista));
                btnCriarNovaLista.Click();

                espera.Until(ExpectedConditions.ElementToBeClickable(campoNomeNovaPlanilha));
                campoNomeNovaPlanilha.SendKeys(nomePlanilha);

                espera.Until(ExpectedConditions.ElementToBeClickable(btnSalvar));
                btnSalvar.Click();

                IWebElement elementoCapturado = oMetodosComuns.CapturaElementoDaLista(driver, nomePlanilha, "br.com.cedrotech.fastmobile.dev:id/listName");

                espera.Until(ExpectedConditions.ElementToBeClickable(elementoCapturado));
                elementoCapturado.Click();
            }
        }
Пример #3
0
        public void AdicionaAtivosPlanilha(string nomePlanilha, string nomeAtivo)
        {
            MetodosComuns oMetodosComuns = new MetodosComuns();

            AdicionarPlanilhaCotacao(nomePlanilha);

            espera.Until(ExpectedConditions.ElementToBeClickable(btnAdicionaAtivo));
            btnAdicionaAtivo.Click();

            oMetodosComuns.AddAtivoNaPlanilhaCotacaoAtual(driver, nomeAtivo);
        }
Пример #4
0
        public void RenomearPlanilhaCotacao(string nomeDaPlanilha, string novoNomeDaPlanilha)
        {
            MetodosComuns oMetodosComuns = new MetodosComuns();

            LoginCorreto();

            Thread.Sleep(3000);

            espera.Until(ExpectedConditions.ElementToBeClickable(btnExpandirListas));
            btnExpandirListas.Click();

            //Nesse tratamento caso não haja uma planilha para renomear o teste cria uma.
            try
            {
                var planilhaSelecionada = oMetodosComuns.CapturaElementoDaLista(driver, nomeDaPlanilha, "br.com.cedrotech.fastmobile.dev:id/listName");

                espera.Until(ExpectedConditions.ElementToBeClickable(planilhaSelecionada));
                oMetodosComuns.LongPressPosicoesFixas(driver, planilhaSelecionada.Location.X + 300, planilhaSelecionada.Location.Y, planilhaSelecionada.Location.X, planilhaSelecionada.Location.Y);

                espera.Until(ExpectedConditions.ElementToBeClickable(btnRenomearPlanilha));
                btnRenomearPlanilha.Click();

                espera.Until(ExpectedConditions.ElementToBeClickable(campoNomeNovaPlanilha));
                campoNomeNovaPlanilha.SendKeys(novoNomeDaPlanilha);

                espera.Until(ExpectedConditions.ElementToBeClickable(btnSalvar));
                btnSalvar.Click();
            }
            catch
            {
                espera.Until(ExpectedConditions.ElementToBeClickable(btnCriarNovaLista));
                btnCriarNovaLista.Click();

                espera.Until(ExpectedConditions.ElementToBeClickable(campoNomeNovaPlanilha));
                campoNomeNovaPlanilha.SendKeys(nomeDaPlanilha);

                espera.Until(ExpectedConditions.ElementToBeClickable(btnSalvar));
                btnSalvar.Click();

                var planilhaSelecionada = oMetodosComuns.CapturaElementoDaLista(driver, nomeDaPlanilha, "br.com.cedrotech.fastmobile.dev:id/listName");

                espera.Until(ExpectedConditions.ElementToBeClickable(planilhaSelecionada));
                oMetodosComuns.LongPressPosicoesFixas(driver, planilhaSelecionada.Location.X + 300, planilhaSelecionada.Location.Y, 100, planilhaSelecionada.Location.Y);

                espera.Until(ExpectedConditions.ElementToBeClickable(btnRenomearPlanilha));
                btnRenomearPlanilha.Click();

                espera.Until(ExpectedConditions.ElementToBeClickable(campoNomeNovaPlanilha));
                campoNomeNovaPlanilha.SendKeys(novoNomeDaPlanilha);

                espera.Until(ExpectedConditions.ElementToBeClickable(btnSalvar));
                btnSalvar.Click();
            }
        }
Пример #5
0
        public void VisualizarPlanilhaCotacaoResumida(string nomeAtivo)
        {
            MetodosComuns oMetodosComuns = new MetodosComuns();

            LoginCorreto();

            Thread.Sleep(3000);

            var listaDeAtivos = driver.FindElementsById("br.com.cedrotech.fastmobile.dev:id/quoteSimbol");

            if (listaDeAtivos[0].Text == "")
            {
                espera.Until(ExpectedConditions.ElementToBeClickable(btnAdicionaAtivo));
                btnAdicionaAtivo.Click();

                oMetodosComuns.AddAtivoNaPlanilhaCotacaoAtual(driver, nomeAtivo);

                espera.Until(ExpectedConditions.ElementToBeClickable(visaoResumida));
                visaoResumida.Click();
            }
        }