public void EditarCobrancaBoleto_10524() { 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.AcessarMenuOperacaoTituloCentralDeAtendimento(); mcFunctions.SearchHolder("N/S9440-0"); mcFunctions.AcessarCobrancasEditarCobrancas(); mcFunctions.SearchElementByIdAndClick("linkLabelEdit", true); mcFunctions.SearchElementByIdAndClick("comboBoxDunType", true); mcFunctions.SearchElementByNameAndClick("Boleto bancário"); mcFunctions.SearchElementByIdAndClick("buttonDetail", true); mcFunctions.SearchElementByIdAndClick("comboBoxDunInstitution", true); mcFunctions.SearchElementByNameAndClick("BANRISUL BOLETO"); mcFunctions.SearchElementByIdAndClick("buttonOK", true); mcFunctions.SearchElementByIdAndClick("buttonOK", true); mcFunctions.CloseWindow("Cobranças do título"); mcFunctions.FinalizarAtendimentoTitulo(); mcFunctions.CloseWindow("Central de Atendimento"); }
public void EditarCobrancaPagamentoOnline_8661() { string holder = "n/s41344-0"; string paymentGateway = "Cielo Qa"; string cardHolderName = "Usuario Teste QA"; string cardNumber = "4111111111111111"; string cardValidity = "12/21"; string securityCode = "123"; 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); mcFunctions.ChangePaymentGateway(paymentGateway); mcMenus.AcessarMenuOperacaoTituloCentralDeAtendimento(); mcFunctions.SearchHolder(holder); mcFunctions.AcessarCobrancasEditarCobrancas(); mcFunctions.SearchElementByIdAndClick("linkLabelEdit", true); mcFunctions.SearchElementByIdAndClick("comboBoxDunType"); mcFunctions.SearchElementByNameAndClick("À vista"); mcFunctions.SearchElementByIdAndClick("buttonOK"); mcFunctions.CloseWindow("Cobranças do título"); mcFunctions.AcessarCobrancasEditarCobrancas(); mcFunctions.SearchElementByIdAndClick("linkLabelEdit"); mcFunctions.SearchElementByIdAndClick("comboBoxDunType"); mcFunctions.SearchElementByNameAndClick("Pagamento online"); mcFunctions.SearchElementByIdAndClick("buttonDetail"); mcFunctions.SearchElementByIdAndClick("buttonCreditCardEdit"); mcFunctions.SearchElementByIdAndClick("comboBoxCardType"); mcFunctions.SearchElementByNameAndClick("Visa"); mcFunctions.SearchElementByIdAndSendKeys("textBoxCardHolderName", cardHolderName); mcFunctions.SearchElementByIdAndSendKeys("textBoxCardNumber", cardNumber); mcFunctions.SearchElementByIdAndSendKeys("maskedTextBoxCardValidity", "{HOME}" + cardValidity); mcFunctions.SearchElementByIdAndSendKeys("textBoxSecurityCode", securityCode); mcFunctions.SearchElementByIdAndClick("buttonOK", true); mcFunctions.SearchElementByIdAndClick("buttonOK", true); mcFunctions.SearchElementByIdAndClick("buttonOK", true); mcFunctions.CloseWindow("Cobranças do título"); mcFunctions.FinalizarAtendimentoTitulo(); mcFunctions.CloseWindow("Central de atendimento"); }
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"); }
public void VendaDeTituloPorBoleto_7221() { 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 name = "Sócio criado em " + DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss"); string planName = "Gratuito"; McMenus.AcessarMenuOperacaoTituloCadastroDeTitulo(); McFunctions.SearchElementByIdAndClick("comboBoxSalePlan"); McFunctions.SearchElementByNameAndClick("AGE - AGEPES"); McFunctions.SearchElementByIdAndSendKeys("maskedTextBoxPostalCode", "01311000", true); McFunctions.SearchElementByIdAndClick("buttonSearch"); McFunctions.SearchElementByIdAndSendKeys("textBoxNumber", "100", true); McFunctions.SearchElementByIdAndClick("buttonOK"); McFunctions.SearchElementByIdAndSendKeys("textBoxName", name); McFunctions.SearchElementByIdAndSendKeys("textBox", "123"); McFunctions.SearchElementByIdAndClick("buttonOK"); McFunctions.SearchElementByIdAndClick("buttonFinalize", true); McFunctions.SearchElementByNameAndClick("Sim", true); McFunctions.SearchElementByIdAndClick("buttonService", true); McFunctions.AcessarProdutosAReceber(); McFunctions.WaitForElementLoad(By.Id("listViewParcel"), 2); var listViewParcelElements = driver.FindElement(By.Id("listViewParcel")).FindElements(By.Id("")); Assert.AreEqual(planName, listViewParcelElements[0].GetAttribute("Name")); Assert.IsNotNull(listViewParcelElements[6].GetAttribute("Name")); McFunctions.CloseWindow("Parcelas"); McFunctions.FinalizarAtendimentoTitulo(); McFunctions.CloseWindow("Central de atendimento"); }
public void VerificarCobrancaDeDependente_7866() { string holder = "A28234"; string billingType = "Mensalidade Dependente"; 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.AcessarMenuOperacaoTituloCentralDeAtendimento(); McFunctions.SearchHolder(holder); McFunctions.AcessarCobrancasEditarCobrancas(); McFunctions.WaitForElementLoad(By.Id("listView")); var listViewDunElements = driver.FindElement(By.Id("listView")).FindElements(By.Id("")); int counter = 0; bool dependentBillingFound = false; string valueBilling = String.Empty; foreach (IWebElement i in listViewDunElements) { if (i.GetAttribute("Name") == billingType) { valueBilling = listViewDunElements[counter + 3].GetAttribute("Name"); dependentBillingFound = true; break; } counter++; } bool dependentBillingValueFound = false; if (valueBilling.Contains("R$ ") && valueBilling.Contains(",")) { dependentBillingValueFound = true; } McFunctions.CloseWindow("Cobranças do título"); McFunctions.FinalizarAtendimentoTitulo(); McFunctions.CloseWindow("Central de atendimento"); Assert.IsTrue(dependentBillingFound, "Cobrança de dependente encontrada"); Assert.IsTrue(dependentBillingValueFound, "Valor da cobrança de dependente encontrada"); }
public void InclusaoDeDependenteComPendenciaAutomaticaAtiva_9761() { MultiClubesFunctions mcFunctions = new MultiClubesFunctions(); MultiClubesMenus mMcMenus = 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 dependentName = "Dependente criado em " + DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss"); mcFunctions.AcessarCentralDeAtendimento(); mcFunctions.SearchHolder("age0399"); 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"); mcFunctions.WaitForElementLoad(By.Id("labelWarning")); bool foundText = driver.FindElement(By.Id("labelWarning")).GetAttribute("Name").Contains("Cadastro de dependente local"); IWebElement holderElement = driver.FindElement(By.Name("Dependente")); holderElement.Click(); new Actions(driver).MoveToElement(holderElement).ContextClick(holderElement).Build().Perform(); mcFunctions.SearchElementByNameAndClick("Status", true); mcFunctions.SearchElementByNameAndClick("Excluir", true); mcFunctions.SearchElementByNameAndClick("Sim", true); mcFunctions.SearchElementByNameAndClick("OK", true); mcFunctions.FinalizarAtendimentoTitulo(); mcFunctions.CloseWindow(); Assert.IsTrue(foundText, "Texto \"Cadastro de dependente local\" presente na \"labelWarning\""); }
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 GerarCobrancaIndividual_7688() { 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.AcessarMenuOperacaoTituloCentralDeAtendimento(); McFunctions.SearchHolder("A28248"); McFunctions.AcessarCobrancasEditarCobrancas(); McFunctions.WaitForElementLoad(By.Id("listViewDuns")); string billing = driver.FindElement(By.Id("listViewDuns")).FindElements(By.Id(""))[0].GetAttribute("Name"); string billingValue = billing.Substring(billing.IndexOf("R$")); Console.WriteLine(billingValue); McFunctions.SearchElementByIdAndClick("linkLabelGenerate"); McFunctions.SearchElementByIdAndClick("buttonGenerate", true); McFunctions.SearchElementByNameAndClick("Sim", true); McFunctions.WaitForElementLoad(By.Name("OK")); string generatedBilling = driver.FindElement(By.Id("labelTotalValue")).GetAttribute("Name"); McFunctions.SearchElementByNameAndClick("OK"); McFunctions.CloseWindow("Cobranças do título"); McFunctions.FinalizarAtendimentoTitulo(); McFunctions.CloseWindow("Central de Atendimento"); Assert.AreEqual(billingValue, generatedBilling, "Valor previsto foi o valor gerado"); }
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"); }
public void GerarCobrancaAtravesDeImportacaoDeArquivo_7697() { string holder = "A28248"; string filePath = "C:/TestesAutomatizados/TestResults/"; string fileName = "cobranca_por_arquivo" + DateTime.Now.ToString("_dd_MM_yyyy_HH_mm_ss") + ".csv"; string valueBilling = "123,45"; using (var w = new StreamWriter(filePath + fileName)) { w.WriteLine("Título;Sócio;Valor;Data de vencimento;Produto"); w.WriteLine("{0};;{1};{2};Produto Teste Cobranca por Arquivo", holder, valueBilling, DateTime.Now.ToString("dd/MM/yyyy")); w.Flush(); } 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.AcessarMenuOperacaoFinanceiroCobrancaImportacaoDeCobranca(); driver.FindElement(By.Id("textBoxFileName")).Click(); Keyboard.SendKeys(filePath + fileName); driver.FindElement(By.Id("buttonGenerate")).Click(); McFunctions.WaitForElementLoad(By.Name("OK"), 10); driver.FindElement(By.Name("OK")).Click(); McFunctions.CloseWindow("Importação de cobrança"); McMenus.AcessarMenuOperacaoTituloCentralDeAtendimento(); McFunctions.SearchHolder(holder); McFunctions.AcessarCobrancasAtivas(); McFunctions.WaitForElementLoad(By.Id("listViewDun")); var listViewDunElements = driver.FindElement(By.Id("listViewDun")).FindElements(By.Id("")); int counter = 0; bool importedBillingFound = false; foreach (IWebElement i in listViewDunElements) { if (i.GetAttribute("Name") == DateTime.Now.ToString("dd/MM/yyyy")) { if (listViewDunElements[counter + 3].GetAttribute("Name") == "R$ " + valueBilling) { importedBillingFound = true; break; } } counter++; } McFunctions.CloseWindow("Cobranças ativas"); McFunctions.FinalizarAtendimentoTitulo(); McFunctions.CloseWindow("Central de atendimento"); Assert.IsTrue(importedBillingFound, "Valor da cobrança encontrado nas cobranças ativas"); }
public void TransfereciaDeTituloEmFamiliaComPendenciaAutomaticaAtiva_9766() { 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 dependentName = "Sócio criado em " + DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss"); mcMenus.AcessarMenuAdministracaoTituloPendencias(); mcFunctions.SearchElementByNameAndClick("Título"); mcFunctions.SearchElementByNameAndRightClick("Transferência de título"); if (driver.FindElements(By.Name("Ativar")).Count > 0) { mcFunctions.SearchElementByNameAndClick("Ativar"); } mcFunctions.CloseWindow("Pendências"); mcFunctions.AcessarCentralDeAtendimento(); mcFunctions.SearchHolder("age0397"); mcFunctions.SearchElementByNameAndClick("Título", true); mcFunctions.SearchElementByIdAndClick("sideButtonNewMember", true); mcFunctions.SearchElementByIdAndSendKeys("textBoxName", dependentName, true); mcFunctions.SearchElementByIdAndClick("comboBoxParentage"); mcFunctions.SearchElementByNameAndClick("Parentesco Teste Automatizado"); mcFunctions.SearchElementByIdAndSendKeys("textBox", "123"); mcFunctions.SearchElementByIdAndClick("buttonOK"); mcFunctions.WaitForElementLoad(By.Id("LargeIncrement")); driver.FindElement(By.Id("sideBar")).FindElement(By.Id("LargeIncrement")).Click(); mcFunctions.SearchElementByIdAndClick("sideButtonTransferTitle", true); mcFunctions.SearchElementByIdAndClick("radioButtonFamily", true); mcFunctions.SearchElementByIdAndClick("comboBoxProduct"); mcFunctions.SearchElementByNameAndClick("Transferencia sem custo"); mcFunctions.SearchElementByIdAndClick("buttonOK"); mcFunctions.SearchElementByIdAndClick("comboBoxMember", true); mcFunctions.SearchElementByNameAndClick(dependentName); mcFunctions.SearchElementByIdAndClick("buttonAdvance"); mcFunctions.SearchElementByNameAndClick("Sim", true); mcFunctions.SearchElementByNameAndClick("OK", true); IWebElement holderElement = driver.FindElement(By.Name("Dependente")); holderElement.Click(); new Actions(driver).MoveToElement(holderElement).ContextClick(holderElement).Build().Perform(); mcFunctions.SearchElementByNameAndClick("Status", true); mcFunctions.SearchElementByNameAndClick("Ativar", true); mcFunctions.SearchElementByNameAndClick("OK", true); holderElement.Click(); new Actions(driver).MoveToElement(holderElement).ContextClick(holderElement).Build().Perform(); mcFunctions.SearchElementByNameAndClick("Status", true); mcFunctions.SearchElementByNameAndClick("Excluir", true); mcFunctions.SearchElementByNameAndClick("Sim", true); mcFunctions.SearchElementByNameAndClick("OK", true); mcFunctions.FinalizarAtendimentoTitulo(); mcFunctions.CloseWindow(); }
public void DesfazerAcertoDePromotorComCobrancaGerada_8200() { 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); // 1. Pré-requisito: Acerto de comissão gerada para o promotor @NomePromotor, associado ao título @IdTitulo McMenus.AcessarMenuOperacaoFinanceiroAcertoDeComissao(); McFunctions.SearchElementByNameAndClick("Localizar"); McFunctions.WaitForElementLoad(By.Id("listView")); List <IWebElement> elementlist = new List <IWebElement>(); elementlist.AddRange(driver.FindElement(By.Id("listView")).FindElements(By.Name("Sophie Promotor"))); if (elementlist.Count > 0) { new Actions(driver).ContextClick(elementlist[0]).Perform(); McFunctions.SearchElementByNameAndClick("Gerar acerto"); McFunctions.SearchElementByNameAndClick("Sim"); McFunctions.SearchElementByIdAndClick("buttonCancel", true); } //3.Logar no MultiClubes // Presente no TestInitialize //4.Acessar Central de Atendimento McFunctions.AcessarCentralDeAtendimento(); //5.Localizar e Acessar Título McFunctions.AcessarCentralDeAtendimento(); McFunctions.SearchHolder("008Pro"); //6.Acessar o menu Produtos //Serem apresentadas as opções A receber, Recebido, Desativados, Créditos, Resgate, Parcelamento e Mudar promotor //// Já vem marcada como default //7.Clicar na opção A receber //Ser apresentada tela contendo as parcelas de produtos a receber, constando parcela do produto Acerto promotor McFunctions.AcessarProdutosAReceber(); //8.Copiar o valor referente a coluna Nosso número McFunctions.WaitForElementLoad(By.Id("listViewParcel")); var ListViewParcelElements = driver.FindElement(By.Id("listViewParcel")).FindElements(By.Id("")); int counterStep8 = 0; foreach (IWebElement i in ListViewParcelElements) { if (i.GetAttribute("Name") == "Acerto Promotor") { break; } counterStep8++; } var nossoNumero = ListViewParcelElements[counterStep8 + 6].GetAttribute("Name"); McFunctions.CloseWindow(); //9.Clicar no menu Cobranças //Serem apresentadas as opções Ativas, Desativadas e Editar Cobranças //10.Clicar na opção Ativas //Ser apresentada tela contendo as cobranças ativas, constando na coluna Nosso número o mesmo valor do número copiado no passo 8 McFunctions.AcessarCobrancasAtivas(); McFunctions.WaitForElementLoad(By.Id("listViewDun")); var listViewDunElements = driver.FindElement(By.Id("listViewDun")).FindElements(By.Id("")); int counterStep9 = 0; bool encontrounn = false; foreach (IWebElement i in listViewDunElements) { if (i.GetAttribute("Name") == nossoNumero) { encontrounn = true; break; } counterStep9++; } Assert.IsTrue(encontrounn, "Nosso numero encontrado"); McFunctions.CloseWindow(); McFunctions.FinalizarAtendimentoTitulo(); //11.Acessar Acerto de Comissão McMenus.AcessarMenuOperacaoFinanceiroAcertoDeComissao(); //12.Clicar no menu Histórico //Ser apresentada tela para acessar o histórico de acertos de promotores gerados McFunctions.SearchElementByIdAndClick("sideButtonClassHistoric"); McFunctions.SearchElementByNameAndClick("Promotor", true); Thread.Sleep(500); McFunctions.SearchElementByNameAndClick("Promotor"); //13.Clicar no botão Localizar //Ser apresentada lista contendo todos os acertos de promotores gerados McFunctions.SearchElementByIdAndClick("buttonFilter"); //14.Localizar e clicar no acerto de comissão referente aos passos 7 e 10 //Registro de acerto ser corretamente selecionado e apresentado em destaque //15.Dar duplo clique no registro de acerto de promotor //Ser apresentada tela contendo Detalhe do acerto da comissão new Actions(driver).DoubleClick(driver.FindElementsByName("Sophie Promotor")[3]).Build().Perform(); //16.Clicar no botão Opções //Ser apresentado sub - menu contendo as opções disponíveis McFunctions.SearchElementByNameAndClick("Opções"); //17.No sub-menu, clicar na opção Desfazer acerto //Ser apresentada tela solicitando confirmação para desfazer acerto de comissão para o promotor McFunctions.SearchElementByNameAndClick("Desfazer acerto"); //18.Clicar no botão Sim //Acerto de comissão de promotor ser corretamente desfeito e ser apresentada tela de histórico de acertos sem constar o acerto de comissão desfeito McFunctions.SearchElementByNameAndClick("Sim"); McFunctions.CloseWindow(); McFunctions.CloseWindow(); //19.Acessar Central de Atendimento McFunctions.AcessarCentralDeAtendimento(); //20.Localizar e Acessar Título McFunctions.AcessarCentralDeAtendimento(); McFunctions.SearchHolder("008Pro"); //21.Repetir os passos 6 e 7 //Ser apresentada tela contendo as parcelas de produtos a receber, não constando parcela do produto Acerto promotor, desfeita no passo 18 McFunctions.AcessarProdutosAReceber(); McFunctions.WaitForElementLoad(By.Id("listViewParcel")); var NewlistViewParcelElements = driver.FindElement(By.Id("listViewParcel")).FindElements(By.Id("")); var counterStep21 = 0; bool encontrouacertopromotor = false; foreach (IWebElement i in NewlistViewParcelElements) { if (i.GetAttribute("Name") == "Acerto Promotor") { encontrouacertopromotor = true; break; } counterStep21++; } Assert.IsFalse(encontrouacertopromotor, "Acerto Promotor continuou em Produtos a receber"); McFunctions.CloseWindow(); //22.Repetir os passos 9 e 10 //Ser apresentada tela contendo as cobranças ativas, não constando cobrança referente ao acerto de comissão de promotor, desfeita no passo 18 McFunctions.AcessarCobrancasAtivas(); McFunctions.WaitForElementLoad(By.Id("listViewDun")); var NewListViewDunElements = driver.FindElement(By.Id("listViewDun")).FindElements(By.Id("")); var counterStep22 = 0; bool encontrounn2 = false; foreach (IWebElement i in NewListViewDunElements) { if (i.GetAttribute("Name") == nossoNumero) { encontrounn = true; break; } counterStep22++; } Assert.IsFalse(encontrounn2, "Nosso numero encontrado nas cobranças ativas"); McFunctions.CloseWindow(); McFunctions.FinalizarAtendimentoTitulo(); McFunctions.CloseWindow("Central de Atendimento"); }
public void DesativarEAtivarSocio_8021() { 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, 60); McFunctions.SearchElementByIdAndClick("sideButtonNewMember", true); McFunctions.SearchElementByIdAndSendKeys("textBoxName", dependentName, true); McFunctions.SearchElementByIdAndClick("comboBoxParentage"); McFunctions.SearchElementByNameAndClick("Nora"); McFunctions.SearchElementByIdAndSendKeys("textBox", "123"); McFunctions.SearchElementByIdAndClick("buttonOK"); McFunctions.WaitForElementLoad(By.Id("listViewMembers")); 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("Desativar"); McFunctions.SearchElementByIdAndClick("buttonOK"); McFunctions.WaitForElementLoad(By.Id("listViewMembers")); var listViewDunElements = driver.FindElement(By.Id("listViewMembers")).FindElements(By.Id("")); int dependentNamePosition = 0; foreach (IWebElement i in listViewDunElements) { if (i.GetAttribute("Name") == dependentName) { break; } dependentNamePosition++; } Assert.AreEqual(listViewDunElements[dependentNamePosition + 16].GetAttribute("Name"), "Desativado"); 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("Ativar"); McFunctions.SearchElementByIdAndClick("buttonOK"); McFunctions.WaitForElementLoad(By.Id("listViewMembers")); var newListViewDunElements = driver.FindElement(By.Id("listViewMembers")).FindElements(By.Id("")); Assert.AreEqual(listViewDunElements[dependentNamePosition + 16].GetAttribute("Name"), "Ativo"); McFunctions.FinalizarAtendimentoTitulo(); McFunctions.CloseWindow("Central de atendimento"); }
public void EditarCobrancaDebitoEmConta_6442() { 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.AcessarMenuOperacaoTituloCentralDeAtendimento(); mcFunctions.SearchHolder("N/S9440-0"); mcFunctions.AcessarCobrancasEditarCobrancas(); mcFunctions.SearchElementByIdAndClick("linkLabelEdit", true); //driver.FindElement(By.Id("linkLabelEdit")).Click(); mcFunctions.SearchElementByIdAndClick("comboBoxDunType", true); mcFunctions.SearchElementByNameAndClick("À vista"); mcFunctions.SearchElementByIdAndClick("buttonOK", true); mcFunctions.CloseWindow("Cobranças do título"); //--- mcFunctions.AcessarCobrancasEditarCobrancas(); mcFunctions.SearchElementByIdAndClick("linkLabelEdit", true); //driver.FindElement(By.Id("linkLabelEdkit")).Click(); mcFunctions.SearchElementByIdAndClick("comboBoxDunType", true); mcFunctions.SearchElementByNameAndClick("Débito em conta"); mcFunctions.SearchElementByIdAndClick("buttonDetail"); // Instituição de cobrança mcFunctions.SearchElementByIdAndClick("comboBoxDunInstitution", true); string instituition = "BANCO DO BRASIL DEBITO AUTOMATICO"; mcFunctions.SearchElementByNameAndClick(instituition); // Ciclo mcFunctions.SearchElementByIdAndClick("comboBoxCycle", true); string cycle = "Mensal"; mcFunctions.SearchElementByNameAndClick(cycle); // Agencia e dígito //textBoxCode //textBoxDigit // Conta e dígito //textBoxCode //textBoxDigit // Dia vencimento //IWebElement boxDueDay = driver.FindElement(By.Id("textBoxDueDay")); //boxDueDay.Clear(); //boxDueDay.Click(); //Keyboard.SendKeys("5"); mcFunctions.SearchElementByIdAndSendKeys("textBoxDueDay", "5"); mcFunctions.SearchElementByIdAndClick("buttonOK", true); mcFunctions.SearchElementByIdAndClick("buttonOK", true); mcFunctions.CloseWindow("Cobranças do título"); Assert.AreEqual(driver.FindElement(By.Id("labelDunModeValue")).GetAttribute("Name"), instituition + " " + cycle.ToLower(), "Verificando se o campo Cobrança presente no título informa os valores escolhidos."); mcFunctions.FinalizarAtendimentoTitulo(); mcFunctions.CloseWindow("Central de Atendimento"); }
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"); }
public void EditarMensagemInstrucaoEMensagemExternaDeBoletoPendente_9078() { string holder = "A28282"; string message = "mensagem teste" + DateTime.Now.ToString("_dd_MM_yyyy_HH_mm_ss"); string instruction = "instrução teste" + DateTime.Now.ToString("_dd_MM_yyyy_HH_mm_ss"); string externalMessage = "mensagem externa teste" + 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); McMenus.AcessarMenuOperacaoTituloCentralDeAtendimento(); McFunctions.SearchHolder(holder); McFunctions.AcessarCobrancasAtivas(); McFunctions.WaitForElementLoad(By.Id("listViewYear")); driver.FindElement(By.Id("listViewYear")).FindElements(By.Id(""))[0].Click(); McFunctions.WaitForElementLoad(By.Id("listViewDun")); 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", true); McFunctions.SearchElementByNameAndClick("Boleto"); McFunctions.SearchElementByNameAndClick("Alterar mensagem"); McFunctions.ClearTextAreaById("clipboardTextBox"); McFunctions.SearchElementByIdAndSendKeys("clipboardTextBox", message); McFunctions.SearchElementByNameAndClick("Instrução"); McFunctions.ClearTextAreaById("clipboardTextBox"); McFunctions.SearchElementByIdAndSendKeys("clipboardTextBox", instruction); McFunctions.SearchElementByNameAndClick("Mensagem externa"); McFunctions.ClearTextAreaById("clipboardTextBox"); McFunctions.SearchElementByIdAndSendKeys("clipboardTextBox", externalMessage); McFunctions.SearchElementByIdAndClick("buttonOK"); McFunctions.SearchElementByIdAndClick("buttonOptions"); McFunctions.SearchElementByNameAndClick("Boleto"); McFunctions.SearchElementByNameAndClick("Alterar mensagem"); Assert.AreEqual(driver.FindElement(By.Id("clipboardTextBox")).GetAttribute("Name"), message); McFunctions.SearchElementByNameAndClick("Instrução"); Assert.AreEqual(driver.FindElement(By.Id("clipboardTextBox")).GetAttribute("Name"), instruction); McFunctions.SearchElementByNameAndClick("Mensagem externa"); Assert.AreEqual(driver.FindElement(By.Id("clipboardTextBox")).GetAttribute("Name"), externalMessage); McFunctions.SearchElementByIdAndClick("buttonOK"); McFunctions.CloseWindow("Detalhes da cobrança"); McFunctions.CloseWindow("Cobranças ativas"); McFunctions.FinalizarAtendimentoTitulo(); McFunctions.CloseWindow("Central de atendimento"); }
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"); }
public void CadastroDeTituloLocalComPendenciaAutomaticaAtiva_9760() { MultiClubesFunctions mcFunctions = new MultiClubesFunctions(); MultiClubesMenus mMcMenus = 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 name = "Sócio criado em " + DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss"); mMcMenus.AcessarMenuOperacaoTituloCadastroDeTitulo(); mcFunctions.SearchElementByIdAndClick("comboBoxSalePlan"); mcFunctions.SearchElementByNameAndClick("AGE - AGEPES 2"); mcFunctions.SearchElementByIdAndSendKeys("maskedTextBoxPostalCode", "01311000"); mcFunctions.SearchElementByIdAndClick("buttonSearch"); mcFunctions.SearchElementByIdAndSendKeys("textBoxNumber", "100", true); mcFunctions.SearchElementByIdAndClick("buttonOK"); mcFunctions.SearchElementByIdAndSendKeys("textBoxName", name); mcFunctions.SearchElementByIdAndClick("buttonChangeDocumentType"); mcFunctions.SearchElementByNameAndClick("Outro"); mcFunctions.SearchElementByIdAndSendKeys("textBox", "123{TAB}321"); mcFunctions.SearchElementByIdAndClick("buttonOK"); if (driver.FindElements(By.Name("Duplicidade de sócio")).Count > 0) { mcFunctions.SearchElementByIdAndClick("buttonOK"); } mcFunctions.SearchElementByIdAndClick("comboBoxDunType"); mcFunctions.SearchElementByNameAndClick("Débito em conta"); mcFunctions.SearchElementByIdAndClick("buttonDetail"); // Instituição de cobrança mcFunctions.SearchElementByIdAndClick("comboBoxDunInstitution", true); string instituition = "BANCO DO BRASIL DEBITO AUTOMATICO"; mcFunctions.SearchElementByNameAndClick(instituition); // Ciclo mcFunctions.SearchElementByIdAndClick("comboBoxCycle", true); string cycle = "Mensal"; mcFunctions.SearchElementByNameAndClick(cycle); mcFunctions.SearchElementByIdAndSendKeys("comboBoxCycle", "{TAB}123{TAB}1{TAB}321{TAB}2"); mcFunctions.SearchElementByIdAndSendKeys("textBoxDueDay", "5"); mcFunctions.SearchElementByIdAndClick("buttonOK", true); mcFunctions.SearchElementByIdAndClick("buttonFinalize"); mcFunctions.SearchElementByNameAndClick("Sim", true); mcFunctions.SearchElementByIdAndClick("buttonService", true); mcFunctions.WaitForElementLoad(By.Id("labelWarning")); mcFunctions.WaitForElementLoad(By.Id("labelWarning")); Assert.IsTrue(driver.FindElement(By.Id("labelWarning")).GetAttribute("Name").Contains("Cadastro de título local"), "Texto \"Cadastro de título local\" presente na \"labelWarning\""); mcFunctions.WaitForElementLoad(By.Name("Fechar")); mcFunctions.FinalizarAtendimentoTitulo(); mcFunctions.CloseWindow("Central de atendimento"); }
public void DesfazerCobrancaIndividual_7695() { 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.AcessarMenuOperacaoTituloCentralDeAtendimento(); McFunctions.SearchHolder("A28248"); McFunctions.AcessarCobrancasAtivas(); McFunctions.WaitForElementLoad(By.Id("listViewYear")); driver.FindElement(By.Id("listViewYear")).FindElements(By.Id(""))[0].Click(); McFunctions.WaitForElementLoad(By.Id("listViewDun")); var listViewDunElements = driver.FindElement(By.Id("listViewDun")).FindElements(By.Id("")); int counter = 0; foreach (IWebElement i in listViewDunElements) { if (i.GetAttribute("Name") == "") { break; } counter++; } string billing = listViewDunElements[counter - 3].GetAttribute("Name"); listViewDunElements[counter - 3].Click(); new Actions(driver).DoubleClick(listViewDunElements[counter - 3]).Build().Perform(); McFunctions.SearchElementByIdAndClick("buttonOptions"); McFunctions.SearchElementByNameAndClick("Desfazer cobrança"); McFunctions.SearchElementByNameAndClick("Sim"); if (driver.FindElements(By.Name("Informação")).Count > 0) { McFunctions.SearchElementByNameAndClick("OK"); McFunctions.SearchElementByNameAndClick("Erros"); } McFunctions.SearchElementByNameAndClick("OK", true); McFunctions.WaitForElementLoad(By.Id("listViewDun")); bool undoneBilling = true; if (driver.FindElement(By.Id("listViewDun")).FindElements(By.Name(billing)).Count > 0) { undoneBilling = false; } McFunctions.CloseWindow("Cobranças ativas"); McFunctions.FinalizarAtendimentoTitulo(); McFunctions.CloseWindow("Central de atendimento"); Assert.IsTrue(undoneBilling, "Cobrança desfeita"); }
public void EditarArquivoRemessaCriarNovoArquivo_7344() { 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.AcessarMenuOperacaoTituloCentralDeAtendimento(); McFunctions.SearchHolder("A28225"); McFunctions.AcessarProdutosAReceber(); McFunctions.WaitForElementLoad(By.Id("listViewParcel")); new Actions(driver).DoubleClick(driver.FindElement(By.Id("listViewParcel")).FindElements(By.Id(""))[0]).Build().Perform(); McFunctions.BillingRemittanceFiles(); McFunctions.WaitForElementLoad(By.Id("buttonNew")); driver.FindElement(By.Id("buttonNew")).Click(); McFunctions.SearchElementByIdAndClick("comboBoxRemittanceType", true); McFunctions.SearchElementByNameAndClick("Impressão"); string fileName = "TESTE_NOVO_" + DateTime.Now.ToString("dd_MM_yyyy_HH_mm_ss"); McFunctions.SearchElementByIdAndSendKeys("textBoxFileName", fileName); McFunctions.SearchElementByIdAndClick("buttonOK"); McFunctions.SearchElementByIdAndClick("buttonOK"); McFunctions.CloseWindow("Detalhes da cobrança"); McFunctions.CloseWindow("Detalhes da parcela e venda"); new Actions(driver).DoubleClick(driver.FindElement(By.Id("listViewParcel")).FindElements(By.Id(""))[8]).Build().Perform(); McFunctions.BillingRemittanceFiles(); bool fileNameExists = false; if (driver.FindElement(By.Id("listView")).FindElements(By.Name(fileName + ".rem")).Count > 0) { fileNameExists = true; } McFunctions.SearchElementByIdAndClick("buttonOK"); McFunctions.CloseWindow("Detalhes da cobrança"); McFunctions.CloseWindow("Detalhes da parcela e venda"); McFunctions.CloseWindow("Produtos a receber"); McFunctions.FinalizarAtendimentoTitulo(); McFunctions.CloseWindow("Central de atendimento"); Assert.IsTrue(fileNameExists, "Encontrou o arquivo remessa criado anteriormente"); }