public void CancelarEdicaoDePlanoDeVenda_7502()
        {
            MultiClubesFunctions McFunctions = new MultiClubesFunctions();
            MultiClubesMenus     McMenus     = new MultiClubesMenus();

            string ocupationMapName = "Mapa de ocupação criado em " + DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss");

            var dc = new DesiredCapabilities();

            dc.SetCapability("app", @"\\tsidev\Triade\Application\Dev\MultiClubes\System\MultiClubes\MultiClubes.UI.application");
            dc.SetCapability("debugConnectToRunningApp", true);
            RemoteWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:9999"), dc);

            McMenus.AcessarMenuAdministracaoFinanceiroPlanosDeVendaPlanos();

            driver.FindElement(By.Id("treeView")).FindElement(By.Name("Ingresso online individual")).Click();
            McFunctions.TreatWaitScreen();

            IWebElement listViewElement = driver.FindElement(By.Id("listView")).FindElement(By.Name(".Ingresso Teste"));

            new Actions(driver).MoveToElement(listViewElement).ContextClick(listViewElement).Build().Perform();
            driver.FindElement(By.Name("Editar")).Click();



            McFunctions.SearchElementByIdAndClick("buttonCancel");
            McFunctions.TreatWaitScreen();

            Assert.AreEqual(driver.FindElements(By.Id("FormSalePlanOnlineEdit")).Count, 0, "Janela fechada");

            McFunctions.CloseWindow("Planos de venda");
        }
示例#2
0
        public void CriarPlanoDeVenda_10720()
        {
            MultiClubesFunctions McFunctions = new MultiClubesFunctions();
            MultiClubesMenus     McMenus     = new MultiClubesMenus();

            string planName = "Plano de venda criado em " + DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss");

            var dc = new DesiredCapabilities();

            dc.SetCapability("app", @"\\tsidev\Triade\Application\Dev\MultiClubes\System\MultiClubes\MultiClubes.UI.application");
            dc.SetCapability("debugConnectToRunningApp", true);
            RemoteWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:9999"), dc);

            McMenus.AcessarMenuAdministracaoFinanceiroPlanosDeVendaPlanos();

            McFunctions.WaitForElementLoad(By.Id("treeView"));

            driver.FindElement(By.Id("treeView")).FindElement(By.Name("Título local")).Click();

            McFunctions.WaitForElementLoad(By.Id("listView"), 2);

            IWebElement listViewElement = driver.FindElement(By.Id("listView"));

            new Actions(driver).MoveToElement(listViewElement).ContextClick(listViewElement).Build().Perform();
            driver.FindElement(By.Name("Incluir")).Click();

            McFunctions.TreatWaitScreen();

            McFunctions.WaitForElementLoad(By.Id("textBoxName"), 2);
            McFunctions.SearchElementByIdAndSendKeys("textBoxName", planName);

            driver.FindElement(By.Id("comboBoxTitleType")).Click();
            driver.FindElement(By.Name("AA - Teste")).Click();

            driver.FindElement(By.Id("comboBoxTitleCodeSequence")).Click();
            driver.FindElement(By.Name("AE")).Click();

            McFunctions.SearchElementByNameAndClick("Venda");

            driver.FindElement(By.Id("comboBoxProduct")).Click();
            driver.FindElement(By.Name("Título A")).Click();

            driver.FindElement(By.Id("comboBoxDunInstitution")).Click();
            driver.FindElement(By.Name("BRADESCO BOLETO MULTICLUBES")).Click();

            McFunctions.SearchElementByIdAndClick("buttonOK");
            McFunctions.TreatWaitScreen();

            bool createdPlan = false;

            if (listViewElement.FindElements(By.Name(planName)).Count > 0)
            {
                createdPlan = true;
            }

            McFunctions.CloseWindow("Planos de venda");

            Assert.IsTrue(createdPlan, "Plano criado");
        }
        public void VenderTituloNoCaixaComConfirmacao_5589()
        {
            string name = "Sócio criado em " + DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss");

            MultiClubesFunctions McFunctions = new MultiClubesFunctions();
            MultiClubesMenus     McMenus     = new MultiClubesMenus();
            OpenCash             openCash    = new OpenCash();

            var dc = new DesiredCapabilities();

            dc.SetCapability("app", @"\\tsidev\Triade\Application\Dev\MultiClubes\System\MultiClubes\MultiClubes.UI.application");
            dc.SetCapability("debugConnectToRunningApp", true);
            RemoteWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:9999"), dc);

            openCash.OpenCashMethod();

            McMenus.AcessarMenuOperacaoTituloCadastroDeTitulo();

            McFunctions.SearchElementByIdAndClick("comboBoxSalePlan");
            McFunctions.SearchElementByNameAndClick("AGE - AGEPES");

            McFunctions.TreatWaitScreen();

            McFunctions.SearchElementByIdAndSendKeys("maskedTextBoxPostalCode", "01311000");

            McFunctions.SearchElementByIdAndClick("buttonSearch");
            McFunctions.TreatWaitScreen();

            McFunctions.SearchElementByIdAndSendKeys("textBoxNumber", "100");

            McFunctions.SearchElementByIdAndClick("buttonOK");

            McFunctions.SearchElementByIdAndSendKeys("textBoxName", name);
            McFunctions.SearchElementByIdAndSendKeys("textBox", "123");
            McFunctions.SearchElementByIdAndClick("buttonOK");

            McFunctions.SearchElementByIdAndClick("buttonFinalize", true);
            McFunctions.SearchElementByNameAndClick("Sim", true);
            McFunctions.TreatWaitScreen();

            McFunctions.SearchElementByIdAndClick("buttonClose");

            McMenus.AcessarMenuOperacaoTituloCentralDeAtendimento();
            McFunctions.SendAndCheckKeys("textBoxKeyword", name);
            Keyboard.SendKeys("{Enter}");

            McFunctions.TreatWaitScreen();

            bool foundHolder = false;

            if (driver.FindElement(By.Id("listView")).FindElements(By.Name(name)).Count > 0)
            {
                foundHolder = true;
            }

            Assert.IsTrue(foundHolder, "Título não foi criado");

            McFunctions.CloseWindow("Central de Atendimento");
        }
示例#4
0
        public void VisualizacaoDeBoletoIndividualSemImpressoraInstalada_8942()
        {
            string holder = "A28282";

            MultiClubesFunctions McFunctions = new MultiClubesFunctions();
            MultiClubesMenus     McMenus     = new MultiClubesMenus();
            OpenCash             openCash    = new OpenCash();

            var dc = new DesiredCapabilities();

            dc.SetCapability("app", @"\\tsidev\Triade\Application\Dev\MultiClubes\System\MultiClubes\MultiClubes.UI.application");
            dc.SetCapability("debugConnectToRunningApp", true);
            RemoteWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:9999"), dc);

            McMenus.AcessarMenuOperacaoTituloCentralDeAtendimento();
            McFunctions.SearchHolder(holder);

            McFunctions.AcessarCobrancasAtivas();

            McFunctions.WaitForElementLoad(By.Id("listViewDun"));

            McFunctions.WaitForElementLoad(By.Id("listViewYear"));
            driver.FindElement(By.Id("listViewYear")).FindElements(By.Id(""))[0].Click();

            var listViewDunElements = driver.FindElement(By.Id("listViewDun")).FindElements(By.Id(""));

            Console.WriteLine("Valor da cobrança: {0}", listViewDunElements[4].GetAttribute("Name"));

            new Actions(driver).MoveToElement(driver.FindElement(By.Id("listViewDun")).FindElements(By.Id(""))[0]).Build().Perform();
            new Actions(driver).DoubleClick(driver.FindElement(By.Id("listViewDun")).FindElements(By.Id(""))[0]).Build().Perform();

            McFunctions.SearchElementByIdAndClick("buttonOptions");
            McFunctions.SearchElementByNameAndClick("Boleto");
            McFunctions.SearchElementByNameAndClick("Imprimir");
            McFunctions.SearchElementByNameAndClick("Visualizar");

            McFunctions.TreatWaitScreen(5);

            McFunctions.WaitForElementLoad(By.Id("labelMessage"));
            Assert.AreEqual("Boleto bancário", driver.FindElement(By.Id("labelMessage")).GetAttribute("Name"));
            Assert.IsTrue(driver.FindElement(By.Id("printPreviewControl")).Enabled);

            Assert.Inconclusive("É necessário validar os dados do boleto manualmente");

            SendKeys.SendWait("(%{F4})");
            McFunctions.SearchElementByIdAndClick("buttonCancel", true);
            McFunctions.TreatWaitScreen(5);
            McFunctions.CloseWindow("Detalhes da cobrança");
            McFunctions.TreatWaitScreen(5);
            McFunctions.CloseWindow("Cobranças ativas");
            McFunctions.FinalizarAtendimentoTitulo();
            McFunctions.CloseWindow("Central de atendimento");
        }
示例#5
0
        public void VenderTituloNoCaixaDefinirDesconto_5591()
        {
            string name = "Sócio criado em " + DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss");

            MultiClubesFunctions McFunctions = new MultiClubesFunctions();
            MultiClubesMenus     McMenus     = new MultiClubesMenus();
            OpenCash             openCash    = new OpenCash();

            var dc = new DesiredCapabilities();

            dc.SetCapability("app", @"\\tsidev\Triade\Application\Dev\MultiClubes\System\MultiClubes\MultiClubes.UI.application");
            dc.SetCapability("debugConnectToRunningApp", true);
            RemoteWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:9999"), dc);

            openCash.OpenCashMethod();

            McMenus.AcessarMenuOperacaoTituloCadastroDeTitulo();

            McFunctions.SearchElementByIdAndClick("comboBoxSalePlan", true, 2);
            McFunctions.SearchElementByNameAndClick("AGE - AGEPES");

            McFunctions.TreatWaitScreen();

            McFunctions.SearchElementByIdAndSendKeys("maskedTextBoxPostalCode", "01311000");

            McFunctions.SearchElementByIdAndClick("buttonSearch");
            McFunctions.TreatWaitScreen();

            McFunctions.SearchElementByIdAndSendKeys("textBoxNumber", "100");

            McFunctions.SearchElementByIdAndClick("buttonOK");

            McFunctions.WaitForElementLoad(By.Id("textBoxName"));
            McFunctions.SearchElementByIdAndSendKeys("textBoxName", name);
            McFunctions.SearchElementByIdAndSendKeys("textBox", "123");
            McFunctions.SearchElementByIdAndClick("buttonOK");

            McFunctions.SearchElementByIdAndSendKeys("numericUpDownParcelQuantity", "10", true, 2);
            McFunctions.SearchElementByIdAndSendKeys("numericUpDownEntranceValue", "10,00", true, 2);
            McFunctions.SearchElementByIdAndClick("radioButtonParcelValue");
            McFunctions.SearchElementByIdAndSendKeys("numericUpDownParcelValue", "89,00", true, 2);
            McFunctions.SearchElementByIdAndClick("numericUpDownParcelQuantity");

            this.UIMap.VerificarValorTotal();
            this.UIMap.VerificarValorDoDesconto();
            this.UIMap.VerificarValorOriginal();

            McFunctions.SearchElementByIdAndClick("buttonCancel");
            McFunctions.SearchElementByNameAndClick("Sim");
        }
示例#6
0
        public void SimulacaoDeGeracaoDeCobrancaSemConfirmacao_6392()
        {
            MultiClubesFunctions mcFunctions = new MultiClubesFunctions();
            MultiClubesMenus     McMenus     = new MultiClubesMenus();

            var dc = new DesiredCapabilities();

            dc.SetCapability("app", @"\\tsidev\Triade\Application\Dev\MultiClubes\System\MultiClubes\MultiClubes.UI.application");
            dc.SetCapability("debugConnectToRunningApp", true);
            RemoteWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:9999"), dc);

            McMenus.AcessarMenuOperacaoFinanceiroCobrancaSimulacaoDeCobranca();

            mcFunctions.SearchElementByIdAndClick("buttonSimulate", true);
            mcFunctions.SearchElementByNameAndClick("Não", true);

            mcFunctions.TreatWaitScreen();

            bool simulationScreenFound = false;

            if (driver.FindElementsById("FormDunSimulator").Count > 0)
            {
                simulationScreenFound = true;

                mcFunctions.SearchElementByNameAndClick("Cancelar", true);
                mcFunctions.SearchElementByNameAndClick("OK", true);
            }

            Assert.IsFalse(simulationScreenFound, "Criou a janela de geração de cobrança");

            mcFunctions.CloseWindow("Simulação de cobrança");
        }
        public void EnviarNotificacaoDeCobranca_9787()
        {
            MultiClubesFunctions McFunctions = new MultiClubesFunctions();
            MultiClubesMenus     McMenus     = new MultiClubesMenus();

            var dc = new DesiredCapabilities();

            dc.SetCapability("app", @"\\tsidev\Triade\Application\Dev\MultiClubes\System\MultiClubes\MultiClubes.UI.application");
            dc.SetCapability("debugConnectToRunningApp", true);
            RemoteWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:9999"), dc);

            McMenus.AcessarMenuOperacaoFinanceiroCobrancaNotificacaoDeCobrancaEmail();

            McFunctions.SearchElementByIdAndClick("buttonOK");
            McFunctions.TreatWaitScreen();

            int counter = 0;

            while ((driver.FindElements(By.Name("Enviando...")).Count > 0) && counter < 200)
            {
                Thread.Sleep(1000);
                counter++;
                Console.WriteLine("Tela 'Enviando...' ativa {0}/{1}", counter, 200);
            }

            McFunctions.SearchElementByNameAndClick("OK");
            McFunctions.SearchElementByIdAndClick("buttonCancel");
        }
        public void ImpressaoDeBoletoIndividual_9018()
        {
            string holder = "A28282";

            MultiClubesFunctions McFunctions = new MultiClubesFunctions();
            MultiClubesMenus     McMenus     = new MultiClubesMenus();
            OpenCash             openCash    = new OpenCash();

            var dc = new DesiredCapabilities();

            dc.SetCapability("app", @"\\tsidev\Triade\Application\Dev\MultiClubes\System\MultiClubes\MultiClubes.UI.application");
            dc.SetCapability("debugConnectToRunningApp", true);
            RemoteWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:9999"), dc);

            McMenus.AcessarMenuOperacaoTituloCentralDeAtendimento();
            McFunctions.SearchHolder(holder);

            McFunctions.AcessarCobrancasAtivas();

            McFunctions.WaitForElementLoad(By.Id("listViewDun"));

            var listViewDunElements = driver.FindElement(By.Id("listViewDun")).FindElements(By.Id(""));

            Console.WriteLine("Valor da cobrança: {0}", listViewDunElements[4].GetAttribute("Name"));

            new Actions(driver).MoveToElement(driver.FindElement(By.Id("listViewDun")).FindElements(By.Id(""))[0]).Build().Perform();
            new Actions(driver).DoubleClick(driver.FindElement(By.Id("listViewDun")).FindElements(By.Id(""))[0]).Build().Perform();

            McFunctions.SearchElementByIdAndClick("buttonOptions");
            McFunctions.SearchElementByNameAndClick("Boleto");
            McFunctions.SearchElementByNameAndClick("Imprimir");
            McFunctions.SearchElementByIdAndClick("buttonPrint");

            this.UIMap.ImprimirDoPdf();

            McFunctions.WaitForElementLoad(By.Name("Impressão concluída"));
            SendKeys.SendWait("(%{F4})");

            McFunctions.CloseWindow("Imprimir boletos");
            McFunctions.TreatWaitScreen();
            McFunctions.CloseWindow("Detalhes da cobrança");
            McFunctions.CloseWindow("Cobranças ativas");
            McFunctions.FinalizarAtendimentoTitulo();
            McFunctions.CloseWindow("Central de atendimento");

            Assert.Inconclusive("Verificar o boleto gerado em C:/TestesAutomatizados/TestResults/boleto_tc9018.pdf");
        }
        public void IncluirControleDeAcesso_8704()
        {
            MultiClubesFunctions McFunctions = new MultiClubesFunctions();
            MultiClubesMenus     McMenus     = new MultiClubesMenus();

            string accessControlName            = "Controle de Acesso criado em " + DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss");
            string descriptionAccessControlName = "Descrição " + accessControlName;

            var dc = new DesiredCapabilities();

            dc.SetCapability("app", @"\\tsidev\Triade\Application\Dev\MultiClubes\System\MultiClubes\MultiClubes.UI.application");
            dc.SetCapability("debugConnectToRunningApp", true);
            RemoteWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:9999"), dc);

            McMenus.AcessarMenuAdministracaoAcessoControlesDeAcesso();

            IWebElement listViewElement = driver.FindElement(By.Id("listView"));

            new Actions(driver).MoveToElement(listViewElement).ContextClick(listViewElement).Build().Perform();
            driver.FindElement(By.Name("Incluir")).Click();

            McFunctions.SearchElementByIdAndSendKeys("textBoxName", accessControlName);
            McFunctions.SearchElementByIdAndSendKeys("textBoxDescription", descriptionAccessControlName);

            McFunctions.SearchElementByIdAndClick("buttonRules");

            //verificar quais regras serão aplicadas

            McFunctions.SearchElementByIdAndClick("buttonOK");
            McFunctions.SearchElementByIdAndClick("buttonOK");
            McFunctions.TreatWaitScreen();

            bool createdAcessControl = false;

            if (listViewElement.FindElements(By.Name(accessControlName)).Count > 0)
            {
                createdAcessControl = true;
            }

            McFunctions.CloseWindow("Controle de Acesso");

            Assert.IsTrue(createdAcessControl, "Controle de acesso criado");
        }
        public void AcessarGruposDeProduto_5885()
        {
            MultiClubesFunctions McFunctions = new MultiClubesFunctions();
            MultiClubesMenus     McMenus     = new MultiClubesMenus();

            var dc = new DesiredCapabilities();

            dc.SetCapability("app", @"\\tsidev\Triade\Application\Dev\MultiClubes\System\MultiClubes\MultiClubes.UI.application");
            dc.SetCapability("debugConnectToRunningApp", true);
            RemoteWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:9999"), dc);

            // Para gerar código para este teste, selecione "Gerar Código para Teste de Interface do Usuário Codificado" no menu de atalho e selecione um dos itens do menu.
            McMenus.AcessarMenuAdministracaoFinanceiroGruposDeProdutos();
            McFunctions.TreatWaitScreen();
            this.UIMap.ProcurarTituloMultiClubesGruposDeProduto();
            this.UIMap.ProcurarTextoGruposDeProduto();
            this.UIMap.ProcurarColunaGrupo();
            McFunctions.CloseWindow("Grupos de produto");
        }
        public void InclusaoDeMapaDeOcupacao_9265()
        {
            MultiClubesFunctions McFunctions = new MultiClubesFunctions();
            MultiClubesMenus     McMenus     = new MultiClubesMenus();

            string ocupationMapName = "Mapa de ocupação criado em " + DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss");

            var dc = new DesiredCapabilities();

            dc.SetCapability("app", @"\\tsidev\Triade\Application\Dev\MultiClubes\System\MultiClubes\MultiClubes.UI.application");
            dc.SetCapability("debugConnectToRunningApp", true);
            RemoteWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:9999"), dc);

            // Para gerar código para este teste, selecione "Gerar Código para Teste de Interface do Usuário Codificado" no menu de atalho e selecione um dos itens do menu.
            McMenus.AcessarMenuAdministracaoMapasDeOcupacao();

            IWebElement listViewElement = driver.FindElement(By.Id("listView"));

            new Actions(driver).MoveToElement(listViewElement).ContextClick(listViewElement).Build().Perform();
            driver.FindElement(By.Name("Incluir")).Click();

            McFunctions.WaitForElementLoad(By.Id("textBoxName"));
            McFunctions.SearchElementByIdAndSendKeys("textBoxName", ocupationMapName);

            McFunctions.SearchElementByIdAndClick("buttonOK");
            McFunctions.TreatWaitScreen();

            bool createdAcessControl = false;

            if (listViewElement.FindElements(By.Name(ocupationMapName)).Count > 0)
            {
                createdAcessControl = true;
            }

            McFunctions.CloseWindow("Mapas de ocupação");

            Assert.IsTrue(createdAcessControl, "Mapa de ocupação criado");
        }
        public void InclusaoEExclusaoDeDependente_7875_7876()
        {
            MultiClubesFunctions McFunctions = new MultiClubesFunctions();
            MultiClubesMenus     McMenus     = new MultiClubesMenus();
            OpenCash             openCash    = new OpenCash();

            openCash.OpenCashMethod();

            var dc = new DesiredCapabilities();

            dc.SetCapability("app", @"\\tsidev\Triade\Application\Dev\MultiClubes\System\MultiClubes\MultiClubes.UI.application");
            dc.SetCapability("debugConnectToRunningApp", true);
            RemoteWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:9999"), dc);

            string holderName    = "Sócio criado em " + DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss");
            string dependentName = "Dependente criado em " + DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss");

            McMenus.AcessarMenuOperacaoTituloCadastroDeTitulo();

            McFunctions.SearchElementByIdAndClick("comboBoxSalePlan", true);
            McFunctions.SearchElementByNameAndClick("AGE - AGEPES");

            McFunctions.SearchElementByIdAndSendKeys("maskedTextBoxPostalCode", "01311000", true);

            McFunctions.SearchElementByIdAndClick("buttonSearch");

            McFunctions.SearchElementByIdAndSendKeys("textBoxNumber", "100", true);

            McFunctions.SearchElementByIdAndClick("buttonOK");

            McFunctions.SearchElementByIdAndSendKeys("textBoxName", holderName);
            McFunctions.SearchElementByIdAndSendKeys("textBox", "123");
            McFunctions.SearchElementByIdAndClick("buttonOK");

            McFunctions.SearchElementByIdAndClick("buttonFinalize", true);
            McFunctions.SearchElementByNameAndClick("Sim", true);

            McFunctions.SearchElementByIdAndClick("buttonService", true);

            McFunctions.SearchElementByNameAndClick("Título", true);

            McFunctions.SearchElementByIdAndClick("sideButtonNewMember", true);

            McFunctions.SearchElementByIdAndSendKeys("textBoxName", dependentName, true);
            McFunctions.SearchElementByIdAndClick("comboBoxParentage");
            McFunctions.SearchElementByNameAndClick("Nora");
            McFunctions.SearchElementByIdAndSendKeys("textBox", "123");
            McFunctions.SearchElementByIdAndClick("buttonOK");

            WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(50));

            wait.Until(ExpectedConditions.ElementToBeClickable(By.Id("listViewMembers")));

            var listViewDunElements = driver.FindElement(By.Id("listViewMembers")).FindElements(By.Id(""));

            int  counter        = 0;
            bool dependentFound = false;

            foreach (IWebElement i in listViewDunElements)
            {
                if (i.GetAttribute("Name") == dependentName)
                {
                    dependentFound = true;
                    break;
                }
                counter++;
            }

            Assert.IsTrue(dependentFound, "Dependente não encontrado");

            McFunctions.SearchElementByNameAndClick("Dependente");
            new Actions(driver).MoveToElement(driver.FindElement(By.Name("Dependente"))).ContextClick(driver.FindElement(By.Name("Dependente"))).Build().Perform();

            McFunctions.SearchElementByNameAndClick("Status", true);
            McFunctions.SearchElementByNameAndClick("Excluir");
            McFunctions.SearchElementByNameAndClick("Sim");
            McFunctions.SearchElementByIdAndClick("buttonOK");

            McFunctions.TreatWaitScreen();

            int  counter2        = 0;
            bool dependentFound2 = false;

            foreach (IWebElement i in listViewDunElements)
            {
                if (i.GetAttribute("Name") == dependentName)
                {
                    dependentFound2 = true;
                    break;
                }
                counter2++;
            }

            Assert.IsFalse(dependentFound2, "Dependente encontrado");

            McFunctions.FinalizarAtendimentoTitulo();
            McFunctions.CloseWindow("Central de atendimento");
        }
示例#13
0
        public void VenderProdutoParaTituloCentralDeAtendimento_6478()
        {
            MultiClubesFunctions McFunctions = new MultiClubesFunctions();
            MultiClubesMenus     McMenus     = new MultiClubesMenus();
            OpenCash             openCash    = new OpenCash();

            openCash.OpenCashMethod();

            var dc = new DesiredCapabilities();

            dc.SetCapability("app", @"\\tsidev\Triade\Application\Dev\MultiClubes\System\MultiClubes\MultiClubes.UI.application");
            dc.SetCapability("debugConnectToRunningApp", true);
            RemoteWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:9999"), dc);

            string productName = " Festa Junina - Venda de Tickets - 2,00";

            McMenus.AcessarMenuOperacaoTituloCentralDeAtendimento();

            McFunctions.SearchHolder("A28282");

            McFunctions.SearchElementByNameAndClick("Título");
            driver.FindElement(By.Id("sideBar")).FindElement(By.Id("LargeIncrement")).Click();
            McFunctions.SearchElementByNameAndClick("Vender produto");
            McFunctions.TreatWaitScreen();

            McFunctions.SearchElementByIdAndClick("buttonSelect");
            McFunctions.SearchElementByNameAndClick(productName, true, 2);
            McFunctions.SearchElementByIdAndClick("buttonOK");

            string totalValue = driver.FindElementById("labelTotalValue").GetAttribute("Name");

            McFunctions.SearchElementByIdAndClick("buttonOK");

            McFunctions.SearchElementByNameAndClick("Sim", true, 2);
            McFunctions.TreatWaitScreen();

            McFunctions.SearchElementByIdAndClick("buttonOK", true, 2);

            McFunctions.SearchElementByIdAndClick("buttonReceive", true, 2);
            driver.FindElement(By.Name("Receber")).FindElement(By.Name("Receber")).Click();

            bool productFound = false;

            if (driver.FindElement(By.Id("listViewParcels")).FindElements(By.Name(productName)).Count > 0)
            {
                productFound = true;
            }

            bool valueFound = false;

            if (driver.FindElement(By.Id("listViewParcels")).FindElements(By.Name(totalValue)).Count > 0)
            {
                valueFound = true;
            }

            McFunctions.SearchElementByIdAndClick("buttonAdd");

            McFunctions.SearchElementByIdAndClick("buttonOK");
            McFunctions.SearchElementByNameAndClick("Sim", true, 2);
            McFunctions.TreatWaitScreen();
            McFunctions.TreatWaitScreen();

            McFunctions.SearchElementByIdAndClick("buttonOK", true);

            McFunctions.FinalizarAtendimentoTitulo();
            McFunctions.CloseWindow("Central de atendimento");

            Assert.IsTrue(productFound, "Produto \"" + productName + "\" não encontrado no A Receber");
            Assert.IsTrue(valueFound, "Cobrança de " + totalValue + " não encontrada no A Receber");
        }
示例#14
0
        public void VisualizarMensagemInstrucaoEMensagemExternaDeBoletoPago_9061()
        {
            string holder = "N/S41344-0";

            MultiClubesFunctions McFunctions = new MultiClubesFunctions();
            MultiClubesMenus     McMenus     = new MultiClubesMenus();
            OpenCash             openCash    = new OpenCash();

            var dc = new DesiredCapabilities();

            dc.SetCapability("app", @"\\tsidev\Triade\Application\Dev\MultiClubes\System\MultiClubes\MultiClubes.UI.application");
            dc.SetCapability("debugConnectToRunningApp", true);
            RemoteWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:9999"), dc);

            McMenus.AcessarMenuOperacaoTituloCentralDeAtendimento();
            McFunctions.SearchHolder(holder);

            McFunctions.AcessarCobrancasAtivas();

            McFunctions.WaitForElementLoad(By.Id("listViewYear"));
            driver.FindElement(By.Id("listViewYear")).FindElements(By.Id(""))[0].Click();

            new Actions(driver).DoubleClick(driver.FindElement(By.Id("listViewDun")).FindElements(By.Name("444100000143"))[0]).Build().Perform();
            McFunctions.TreatWaitScreen();
            McFunctions.SearchElementByIdAndClick("buttonOptions");
            McFunctions.SearchElementByNameAndClick("Boleto");
            McFunctions.SearchElementByNameAndClick("Visualizar mensagem");

            bool messageFound = false;

            if (driver.FindElements(By.Name("MSG TESTE")).Count > 0)
            {
                messageFound = true;
            }

            McFunctions.SearchElementByNameAndClick("Instrução");
            bool instructionFound = false;

            if (driver.FindElements(By.Name("INSTRUCAO TESTE")).Count > 0)
            {
                instructionFound = true;
            }

            McFunctions.SearchElementByNameAndClick("Mensagem externa");
            bool externalMessageFound = false;

            if (driver.FindElements(By.Name("MSG EXTERNA TESTE")).Count > 0)
            {
                externalMessageFound = true;
            }

            driver.FindElement(By.Name("Cancelar")).Click();
            McFunctions.CloseWindow("Detalhes da cobrança");
            McFunctions.CloseWindow("Cobranças ativas");
            McFunctions.FinalizarAtendimentoTitulo();
            McFunctions.CloseWindow("Central de atendimento");

            Assert.IsTrue(messageFound, "Mensagem Encontrada");
            Assert.IsTrue(instructionFound, "Instrução Encontrada");
            Assert.IsTrue(externalMessageFound, "Mensagem externa Encontrada");
        }
        public void DetalharCobranca_8409()
        {
            string holder              = "A28282";
            string modalityName        = "AP 2826 - Beach Tênis - Normal - 15:00:00";
            string modalityBillingName = "Beach Tênis";

            MultiClubesFunctions McFunctions = new MultiClubesFunctions();
            MultiClubesMenus     McMenus     = new MultiClubesMenus();
            OpenCash             openCash    = new OpenCash();

            var dc = new DesiredCapabilities();

            dc.SetCapability("app", @"\\tsidev\Triade\Application\Dev\MultiClubes\System\MultiClubes\MultiClubes.UI.application");
            dc.SetCapability("debugConnectToRunningApp", true);
            RemoteWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:9999"), dc);

            openCash.OpenCashMethod();

            McMenus.AcessarMenuOperacaoTituloCentralDeAtendimento();
            McFunctions.SearchHolder(holder);

            McFunctions.WaitForElementLoad(By.Id("listViewMembers"));

            IWebElement holderElement = driver.FindElement(By.Id("listViewMembers")).FindElements(By.Name("Titular"))[0];

            holderElement.Click();

            new Actions(driver).MoveToElement(holderElement).ContextClick(holderElement).Build().Perform();

            new Actions(driver).MoveToElement(driver.FindElement(By.Name("Modalidades"))).Click(driver.FindElement(By.Name("Modalidades"))).Build().Perform();

            driver.FindElement(By.Name("Modalidades")).FindElement(By.Name("Nova matrícula")).Click();

            McFunctions.SearchElementByNameAndClick(modalityName, true);

            McFunctions.SearchElementByNameAndClick("Avançar");

            McFunctions.SearchElementByIdAndClick("checkBoxFirstMaintenance", true);

            McFunctions.SearchElementByIdAndClick("radioButtonMain");

            McFunctions.SearchElementByIdAndClick("buttonOK", true);

            McFunctions.SearchElementByNameAndClick("Sim");

            McFunctions.CashReceiptByBillingGeneration();

            McFunctions.AcessarProdutosAReceber();

            McFunctions.WaitForElementLoad(By.Id("listViewYear"));
            driver.FindElement(By.Id("listViewYear")).FindElements(By.Id(""))[0].Click();

            McFunctions.WaitForElementLoad(By.Id("listViewParcel"), 60);

            IWebElement billingName = driver.FindElement(By.Name(modalityBillingName));

            new Actions(driver).MoveToElement(billingName).DoubleClick(billingName).Build().Perform();

            McFunctions.SearchElementByIdAndClick("buttonOptions", true);
            McFunctions.SearchElementByNameAndClick("Detalhar manutenção");

            McFunctions.WaitForElementLoad(By.Id("listViewDiscounts"));

            bool discountFound      = false;
            bool yesterdayDateFound = false;

            foreach (IWebElement i in driver.FindElement(By.Id("listViewDiscounts")).FindElements(By.Id("")))
            {
                if (i.GetAttribute("Name") == "Até " + DateTime.Now.AddDays(-1).ToString("dd/MM/yyyy"))
                {
                    yesterdayDateFound = true;
                }
                if (i.GetAttribute("Name") == "Aplicado")
                {
                    discountFound = true;
                }
            }
            Assert.IsTrue(yesterdayDateFound, "Período de desconto correto");
            Assert.IsTrue(discountFound, "Desconto proporcional aplicado");

            McFunctions.CloseWindow("Manutenção - Detalhe da geração da manutenção");
            McFunctions.CloseWindow("Parcela - Detalhes da parcela e venda");
            McFunctions.CloseWindow("Parcelas - Produtos a receber");

            new Actions(driver).MoveToElement(holderElement).ContextClick(holderElement).Build().Perform();
            McFunctions.SearchElementByNameAndClick("Modalidades");

            driver.FindElement(By.Name(modalityBillingName + " - " + modalityName)).Click();

            McFunctions.SearchElementByIdAndClick("buttonOptions");

            McFunctions.SearchElementByNameAndClick("Cancelar matrícula");

            McFunctions.WaitForElementLoad(By.Id("listViewParcel"));
            foreach (IWebElement i in driver.FindElement(By.Id("listViewParcel")).FindElements(By.Id("")))
            {
                if (i.GetAttribute("ControlType") == "ControlType.CheckBox")
                {
                    i.Click();
                }
            }
            McFunctions.SearchElementByIdAndClick("buttonOK");
            McFunctions.SearchElementByNameAndClick("Sim");

            McFunctions.TreatWaitScreen();

            bool remainingRegistration = false;

            new Actions(driver).MoveToElement(holderElement).ContextClick(holderElement).Build().Perform();
            driver.FindElement(By.Name("Modalidades")).Click();
            if (driver.FindElements(By.Name(modalityName)).Count == 0)
            {
                remainingRegistration = true;
            }

            Assert.IsTrue(remainingRegistration, "Matrícula cancelada com sucesso");
            McFunctions.FinalizarAtendimentoTitulo();
            McFunctions.CloseWindow("Central de atendimento");
        }