public void Atendimento(ChromeDriver _chrome) { try { AjustClick.ClickByXPath("//*[@id=\"fade-1\"]/div[2]/div/a[4]", _chrome); AjustClick.ClickById("contact_chat", _chrome); if (_chrome.Url.Contains("omne/virtual/")) { PaginaBase.GaveGood(_chrome, pessoa, log); _chrome.Navigate().Back(); } log.cpf = pessoa.CPF; for (int i = 0; i < 20; i++) { _chrome.Navigate().Back(); if (_chrome.Url.Contains("enter/options")) { break; } } } catch (Exception e) { PaginaBase.Error(_chrome, pessoa, log); throw; } }
public void Chat(ChromeDriver _chrome, log_navegacao log) { try { if (log.idportal == Convert.ToInt32(Portal.SkyAdesao) || log.idportal == Convert.ToInt32(Portal.Net)) { } else { pessoa.CPF = log.cpf; AjustClick.ClickById("contact-chat", _chrome); } if (pagebase.ExpectedUrl(_chrome, "callflex.com.b")) { pagebase.GaveGood(_chrome, pessoa, log); _chrome.Navigate().Back(); } else { pagebase.Fail(); } } catch (Exception) { pagebase.Error(_chrome, pessoa, log); } }
public void FullFlow(ChromeDriver chromeDriver) { try { log.idportal = Convert.ToInt32(Portal.sky); log.data_ini = PaginaBase.InserTimeIn(); log.pagina = new Constants().Sly_url; if (!PaginaBase.ValidateNotFound(chromeDriver, log)) { return; } AuxFluxo(chromeDriver); Thread.Sleep(1000); WithDiscount(chromeDriver); EfetuarPagamento(chromeDriver); PaymentMade(chromeDriver); PrevisãoPagamento(chromeDriver); Atendimento(chromeDriver); AjustClick.ClickByXPath("//*[@id=\"index-banner\"]/div[1]/div/div[1]/a/i", chromeDriver); PaginaBase.GaveGood(chromeDriver, pessoa, log); AjustClick.ClickByXPath("//*[@id=\"slide-out\"]/li[6]/a", chromeDriver); } catch (Exception e) { if (e.Message.Equals("Close")) { } else { PaginaBase.Error(chromeDriver, pessoa, log); } throw; } }
public void PaymentMade(ChromeDriver _chrome) { try { _chrome.FindElementByCssSelector("#fade-1 > div:nth-child(2) > div > a:nth-child(3)").Click(); _chrome.FindElementByCssSelector("#fade-1 > div.row.data-pagamento > div > div:nth-child(2) > img.arrow.down.down-day").Click(); AjustClick.ClickById("send-date", _chrome); Thread.Sleep(1000); _chrome.FindElementByCssSelector("#action-modal").Click(); if (PaginaBase.ExpectedUrl(_chrome, "/return-register-date")) { PaginaBase.GaveGood(_chrome, pessoa, log); } else { PaginaBase.Fail(); } for (int i = 0; i < 2; i++) { _chrome.Navigate().Back(); } } catch (Exception) { PaginaBase.Error(_chrome, pessoa, log); throw; } }
public void Sms(ChromeDriver _chrome, Pessoa pessoa, log_navegacao log) { try { if (log.idportal == Convert.ToInt32(Portal.SkyAdesao)) { AjustSendKeys.SendKeysById("name", pessoa.Name, _chrome); AjustSendKeys.SendKeysById("phone", pessoa.Phone, _chrome); AjustClick.ClickById("next-step", _chrome); pagebase.GaveGood(_chrome, pessoa, log); _chrome.Navigate().Back(); _chrome.Navigate().Back(); } else { AjustClick.ClickById("contact-sms", _chrome); AjustSendKeys.SendKeysById("sms_name", pessoa.Name.ToString(), _chrome); AjustSendKeys.SendKeysById("sms_phone", pessoa.Phone.ToString(), _chrome); AjustClick.ClickById("contact-sms-send", _chrome); AjustClick.ClickByXPath("//*[@id=\"confirmation\"]/div/div/div/input", _chrome); pagebase.GaveGood(_chrome, pessoa, log); } } catch (Exception) { pagebase.Error(_chrome, pessoa, log); } }
public void FullFlow(ChromeDriver _chrome) { try { log.idportal = Convert.ToInt32(Portal.FiqueClaro); pessoa.Name = "Test_FiquenaClaro"; log.data_ini = pagbase.InserTimeIn(); pessoa.Phone = pagbase.InsertPhone(); _chrome.Navigate().GoToUrl(new Constants().FiquenClaro_url); if (pagbase.ExpectedUrl(_chrome, new Constants().FiquenClaro_url)) { if (!pagbase.ValidateNotFound(_chrome, log)) { return; } AjustClick.ClickById("contact-whatsapp", _chrome); socialNetworks.WhatsApp(_chrome, log); socialNetworks.Chat(_chrome, log); socialNetworks.Sms(_chrome, pessoa, log); socialNetworks.Facebook(_chrome, log); socialNetworks.Call(_chrome, log, pessoa); pagbase.GaveGood(_chrome, pessoa, log); } else { log.Exception = "Pagina Fora do Ar:" + _chrome.Url.ToString(); } pagbase.Error404(_chrome, pessoa, log); } catch (Exception e) { pagbase.Error(_chrome, pessoa, log); throw; } }
public void Login(ChromeDriver _chrome) { AjustSendKeys.SendKeysById("cpf", pessoa.CPF, _chrome); Thread.Sleep(1000); AjustSendKeys.SendKeysById("email", pessoa.Email, _chrome); AjustSendKeys.SendKeysById("phone", pessoa.Phone, _chrome); AjustClick.ClickById("send-login", _chrome); }
public void Phone(ChromeDriver _chrome, log_navegacao log) { AjustSendKeys.SendKeysById("nome", Name, _chrome); AjustSendKeys.SendKeysById("phone", pessoa.Phone, _chrome); pagebase.GaveGood(_chrome, pessoa, log); AjustClick.ClickByXPath("//*[@id=\"form-contato\"]/div[3]/button", _chrome); AjustClick.ClickByXPath("/html/body/main/section/div/div[2]/button", _chrome); }
public void Register(ChromeDriver _chrome) { AjustSendKeys.SendKeysById("name", pessoa.Name, _chrome); AjustSendKeys.SendKeysById("phone", pessoa.Phone, _chrome); AjustSendKeys.SendKeysById("cpf", pessoa.CPF, _chrome); AjustSendKeys.SendKeysById("email", pessoa.Email, _chrome); AjustClick.ClickById("form-send", _chrome); }
public void FullFlow(ChromeDriver _chrome) { try { log.data_ini = pagebase.InserTimeIn(); log.idportal = Convert.ToInt32(Portal.Net); _chrome.Navigate().GoToUrl(new Constants().ComboNet_url); if (!pagebase.ValidateNotFound(_chrome, log)) { return; } if (_chrome.Url.Equals(new Constants().ComboNet_url)) { //Net HDTV Xpath(_chrome, Net.HDTV, Domain.Enums.Plans.FacilHD); Xpath(_chrome, Net.HDTV, Domain.Enums.Plans.MixHD); Xpath(_chrome, Net.HDTV, Domain.Enums.Plans.TopHD); //NET Virtua Xpath(_chrome, Net.VIRTUA, Domain.Enums.Plans.Virtua5); Xpath(_chrome, Net.VIRTUA, Domain.Enums.Plans.Virtua35); Xpath(_chrome, Net.VIRTUA, Domain.Enums.Plans.Virtua60); Xpath(_chrome, Net.VIRTUA, Domain.Enums.Plans.Virtua120); Xpath(_chrome, Net.VIRTUA, Domain.Enums.Plans.Virtua240); //Net Fone Xpath(_chrome, Net.FONE, Domain.Enums.Plans.Local); Xpath(_chrome, Net.FONE, Domain.Enums.Plans.Brasi21); Xpath(_chrome, Net.FONE, Domain.Enums.Plans.BrasilTotal21); Xpath(_chrome, Net.FONE, Domain.Enums.Plans.MundoTotal21); //Net Combo AjustClick.ClickByXPath("/html/body/main/nav/div/div/div/div/ul[1]/li[4]/a", _chrome); Combos(_chrome, log); //Now AjustClick.ClickByXPath("/html/body/main/nav/div/div/div/div/ul[1]/li[5]/a", _chrome); //Celular //Xpath(_chrome, Net.Celular, Domain.Enums.Plans.GB6); //Xpath(_chrome, Net.Celular, Domain.Enums.Plans.GB8); //Xpath(_chrome, Net.Celular, Domain.Enums.Plans.GB10); //Xpath(_chrome, Net.Celular, Domain.Enums.Plans.GB15); //Xpath(_chrome, Net.Celular, Domain.Enums.Plans.GB30); //Xpath(_chrome, Net.Celular, Domain.Enums.Plans.GB50); //Xpath(_chrome, Net.Celular, Domain.Enums.Plans.Controle); Controle(_chrome, _returnXpath); } pagebase.GaveGood(_chrome, pessoa, log); } catch (Exception e) { log.Exception = e.Message.ToString(); pagebase.Error(_chrome, pessoa, log); throw; } }
public void AuxScheduling(ChromeDriver _chrome) { _chrome.FindElementByCssSelector("body > div.container > div:nth-child(3) > div > div > button:nth-child(2)").Click(); AjustSendKeys.SendKeysById("phone-sms", pessoa.Phone, _chrome); Thread.Sleep(1000); AjustClick.ClickById("send-sms", _chrome); AjustClick.ClickByXPath("/html/body/div[3]/div/div/div[2]/button", _chrome); AjustClick.ClickByXPath("/html/body/div[2]/a/i", _chrome); PagBase.GaveGood(_chrome, pessoa, log); }
public void FullFlow(ChromeDriver _chrome) { try { log.data_ini = pagebase.InserTimeIn(); log.idportal = Convert.ToInt32(Portal.Humana); pessoa.CPF = service.GetCPF(log); pessoa.Phone = pagebase.InsertPhone(); if (_chrome.Url.Equals(new Constants().Humana_url)) { pessoa.Email = "*****@*****.**"; if (!pagebase.ValidateNotFound(_chrome, log)) { return; } Login(_chrome); Thread.Sleep(4000); if (pagebase.ExpectedUrl(_chrome, "pay-info/debt-info")) { NegotiateDebt(_chrome, log); reportpayment(_chrome, log); CustomerService(_chrome, log); } Thread.Sleep(1000); AjustClick.ClickByXPath("/html/body/header/div/div[1]/div[1]/a/i", _chrome); pagebase.GaveGood(_chrome, pessoa, log); AjustClick.ClickByXPath("//*[@id=\"slide-out\"]/li[4]/a", _chrome); } else if (_chrome.Url.Equals(new Constants().Digital_url)) { log.idportal = Convert.ToInt32(Portal.RecoveryDigital); pessoa.Email = "*****@*****.**"; pagebase.ValidatePage(_chrome, tipo.XPath, "//*[@id=\"main-message\"]/h1", "Não foi possível encontrar a página deste", log, pessoa); Login(_chrome); Thread.Sleep(4000); if (pagebase.ExpectedUrl(_chrome, "pay-info/debt-info")) { NegotiateDebt(_chrome, log); reportpayment(_chrome, log); CustomerService(_chrome, log); } Thread.Sleep(1000); AjustClick.ClickByXPath("/html/body/header/div/div[1]/div[1]/a/i", _chrome); pagebase.GaveGood(_chrome, pessoa, log); AjustClick.ClickByXPath("//*[@id=\"slide-out\"]/li[4]/a", _chrome); } } catch (Exception e) { pagebase.Error(_chrome, pessoa, log); throw; } }
public void ValidatePayment(ChromeDriver _chrome, log_navegacao log) { try { if (pagebase.ExpectedUrl(_chrome, "pay-info/methods")) { AjustClick.ClickById("btn_pagamento_a_vista", _chrome); if (pagebase.ExpectedUrl(_chrome, "payment-cash")) { PaymentCash(_chrome); } else { pagebase.Fail(); } AjustClick.ClickById("btn_pagamento_parcelado", _chrome); if (_chrome.Url.Contains("payment-parcel")) { if (log.idportal != 8) { AjustClick.ClickByXPath("/html/body/main/section/div/div[2]/table/tbody/tr[1]/td/div/input", _chrome); //WebDriverWait wait = new WebDriverWait(_chrome, TimeSpan.FromSeconds(30)); //wait.Until(ExpectedConditions.VisibilityOfAllElementsLocatedBy(By.XPath(""))); //_chrome.FindElementByCssSelector("#numero-parcelas-send > option:nth-child(2)").Click(); //AjustClick.ClickByXPath("//*[@id=\"register-bank-slip\"]/p[1]/label", _chrome); //AjustClick.ClickByXPath("//*[@id=\"confirmar-parcelamento\"]", _chrome); //AjustClick.ClickByXPath("/html/body/main/section/div/div[3]/button[3]", _chrome); pagebase.GaveGood(_chrome, pessoa, log); AjustClick.ClickByXPath("/html/body/main/section/div/div[3]/button[3]", _chrome); } else { AjustClick.ClickByXPath("/html/body/main/section/div/div[2]/table/tbody/tr[1]/td/div/input", _chrome); pagebase.GaveGood(_chrome, pessoa, log); AjustClick.ClickByXPath("/html/body/main/section/div/div[3]/button[3]", _chrome); } } else { pagebase.Fail(); } } else { pagebase.Fail(); } } catch (Exception e) { pagebase.Error(_chrome, pessoa, log); } }
public void reportpayment(ChromeDriver _chrome, log_navegacao log) { try { _chrome.FindElementByCssSelector("body > main > section > div > div:nth-child(4) > button:nth-child(2)").Click(); _reportpayment(_chrome, log); } catch (Exception) { AjustClick.ClickByXPath("/html/body/main/section/div/div[3]/button[2]", _chrome); _reportpayment(_chrome, log); } }
public void Register(ChromeDriver _chrome) { AjustSendKeys.SendKeysById("nome", pessoa.Name, _chrome); AjustSendKeys.SendKeysById("email", pessoa.Email, _chrome); AjustSendKeys.SendKeysById("empresa", pessoa.Empresa, _chrome); AjustSendKeys.SendKeysById("CNPJ", pessoa.Phone, _chrome); AjustSendKeys.SendKeysById("telefone", pessoa.CNPJ, _chrome); AjustSendKeys.SendKeysById("cidade", pessoa.Cidade, _chrome); AjustSendKeys.SendKeysById("estado", pessoa.Estado, _chrome); Thread.Sleep(2000); AjustClick.ClickById("resposta", _chrome); AjustClick.ClickById("btn-salvar", _chrome); }
public void WhatsApp(ChromeDriver _chrome, log_navegacao log) { try { if (_chrome.Url.Contains("/contact") || _chrome.Url.Contains("whatsapp")) { pessoa.CPF = log.cpf; if (pagebase.ExpectedUrl(_chrome, "send?phone=")) { Thread.Sleep(1000); _chrome.Url = Regex.Replace(_chrome.Url, "=.+", "=5541900000000"); Thread.Sleep(1000); if (pagebase.ExpectedUrl(_chrome, "send?phone")) { } //deu boa else { pagebase.Fail(); } AjustClick.ClickById("action-button-container", _chrome); Thread.Sleep(100); if (pagebase.ExpectedUrl(_chrome, "web.whatsapp.com/")) { } //Deu boa else { pagebase.Fail(); } } else { pagebase.Fail(); } pagebase.GaveGood(_chrome, pessoa, log); for (int i = 0; i < 20; i++) { _chrome.Navigate().Back(); if (_chrome.Url.Contains("/contact") || _chrome.Url.Contains("fiquenaclaro")) { break; } } } } catch (Exception e) { pagebase.Error(_chrome, pessoa, log); return; } }
public void CreditCard(ChromeDriver _chrome) { AjustClick.ClickById("credit-card", _chrome); Thread.Sleep(1000); if (PaginaBase.ExpectedUrl(_chrome, "virtual/chat/")) { PaginaBase.GaveGood(_chrome, pessoa, log); } else { PaginaBase.Fail(); } _chrome.Navigate().Back(); }
public void AuxFluxo(ChromeDriver chromeDriver) { try { pessoa.CPF = service.GetCPF(log); chromeDriver.Navigate().GoToUrl(new Constants().Sly_url); Thread.Sleep(1000); AjustSendKeys.SendKeysById("cpf", pessoa.CPF, chromeDriver); AjustClick.ClickById("form-send", chromeDriver); Validate(chromeDriver, pessoa); } catch (Exception e) { } }
public void _reportpayment(ChromeDriver _chrome, log_navegacao log) { Thread.Sleep(1000); if (_chrome.Url.Contains("pay-info/schedule")) { AjustClick.ClickByXPath("//*[@id=\"form-alega-pagamento\"]/div[1]/div/div[1]/img[2]", _chrome); AjustClick.ClickByXPath("//*[@id=\"alega-pagamento-send\"]", _chrome); pagebase.GaveGood(_chrome, pessoa, log); AjustClick.ClickById("btn-fechar", _chrome); AjustClick.ClickByXPath("//*[@id=\"form-alega-pagamento\"]/div[2]/button[2]", _chrome); } else { pagebase.Fail(); } }
public void Scheduling(ChromeDriver _chrome) { try { try { PagBase.ExpectedElement(_chrome, "invoice-receive", tipo.Id); { AjustClick.ClickById("invoice-receive", _chrome); IList <IWebElement> div = _chrome.FindElementsByCssSelector("body > div.container > div:nth-child(3) > div > div > button"); foreach (var item in div) { if (item.Text.Equals("SMS")) { item.Click(); } } Thread.Sleep(1000); AjustSendKeys.SendKeysById("phone-sms", pessoa.Phone, _chrome); AjustClick.ClickById("send-sms", _chrome); AjustClick.ClickByXPath("/html/body/div[3]/div/div/div[2]/button", _chrome); AjustClick.ClickByXPath("/html/body/div[2]/a/i", _chrome); PagBase.GaveGood(_chrome, pessoa, log); } } catch (Exception) { AjustClick.ClickById("btnSendValue1", _chrome); AjustClick.ClickByXPath("/html/body/div[3]/div[2]/div/div/div[2]/div[2]/div[2]/div[1]/span[1]/img", _chrome); AjustClick.ClickById("send-date", _chrome); try { PagBase.ExpectedElement(_chrome, "modal-dia-util", tipo.Id); AjustClick.ClickByXPath("//*[@id=\"modal-dia-util\"]/div/div/div/div/div/button", _chrome); AuxScheduling(_chrome); } catch (Exception) { AuxScheduling(_chrome); } } } catch (Exception e) { PagBase.Error(_chrome, pessoa, log); } }
public void Facebook(ChromeDriver _chrome, log_navegacao log) { try { pessoa.CPF = log.cpf; AjustClick.ClickById("contact-facebook", _chrome); if (pagebase.ExpectedUrl(_chrome, "facebook")) { pagebase.GaveGood(_chrome, pessoa, log); _chrome.Navigate().Back(); } } catch (Exception) { pagebase.Error(_chrome, pessoa, log); } }
public void Payment(ChromeDriver _chrome) { try { AjustClick.ClickById("btnAlegaPagamento", _chrome); _chrome.FindElementByCssSelector("body > div.container > div:nth-child(2) > div > div > div.date-desktop > div:nth-child(2) > div.col.s11.m9.l6.center-align > div:nth-child(1) > span.down.down-day > img").Click(); AjustClick.ClickById("send-date", _chrome); PagBase.GaveGood(_chrome, pessoa, log); AjustClick.ClickByXPath("/html/body/div[3]/div/div/div[2]/button", _chrome); Thread.Sleep(1000); AjustClick.ClickByXPath("/html/body/div[2]/a/i", _chrome); } catch (Exception e) { PagBase.Error(_chrome, pessoa, log); } }
public void Email(ChromeDriver _chrome) { try { AjustClick.ClickById("btnEmail", _chrome); AjustClick.ClickById("btnOutroEmail", _chrome); AjustSendKeys.SendKeysById("fatura-formr", pessoa.Email, _chrome); AjustClick.ClickById("btnFatura1", _chrome); Thread.Sleep(1000); _chrome.FindElementByCssSelector("body > div.container > div > div > div.col.l8.offset-l2.s12.m10.offset-m1 > button").Click(); PagBase.GaveGood(_chrome, pessoa, log); } catch (Exception) { PagBase.Error(_chrome, pessoa, log); } }
public void NegotiateDebt(ChromeDriver _chrome, log_navegacao log) { try { _chrome.FindElementByCssSelector("body > main > section > div > div:nth-child(4) > button:nth-child(1)").Click(); ValidatePayment(_chrome, log); pagebase.GaveGood(_chrome, pessoa, log); AjustClick.ClickByXPath("//*[@id=\"btn_voltar\"]", _chrome); } catch (Exception e) { _chrome.FindElementByCssSelector("body > main > section > div > div:nth-child(3) > button:nth-child(1)").Click(); ValidatePayment(_chrome, log); pagebase.GaveGood(_chrome, pessoa, log);; AjustClick.ClickByXPath("//*[@id=\"btn_voltar\"]", _chrome); } }
public void FullFlow(ChromeDriver _chrome) { try { log.data_ini = pag.InserTimeIn(); _chrome.Navigate().GoToUrl(new Constants().SkyAdesao_url); if (_chrome.Url.Equals(new Constants().SkyAdesao_url)) { FillinData(_chrome); log.idportal = Convert.ToInt32(Portal.SkyAdesao); if (!pag.ValidateNotFound(_chrome, log)) { return; } Register(_chrome); pag.ExpectedUrl(_chrome, "contact"); if (_chrome.Url.Contains("contact/")) { AjustClick.ClickById("contact_whatsapp", _chrome); social.WhatsApp(_chrome, log); AjustClick.ClickById("contact_ligacao", _chrome); social.Call(_chrome, log, pessoa); AjustClick.ClickById("contact_sms", _chrome); social.Sms(_chrome, pessoa, log); AjustClick.ClickById("contact_chat", _chrome); _chrome.Navigate().Back(); } else { pag.Fail(); } pag.GaveGood(_chrome, pessoa, log); } else { pag.Fail(); } } catch (System.Exception) { pag.Error(_chrome, pessoa, log); throw; } }
public void AlunoOnlineTestMethod() { chromedriver.Navigate().GoToUrl(urlAlunoOnline); AjustSendKeys.SendKeysById("txtnumero_matricula", login, chromedriver); AjustSendKeys.SendKeysById("txtsenha_tac", senha, chromedriver); AjustClick.ClickById("cmdEnviar", chromedriver); var wait = new WebDriverWait(chromedriver, TimeSpan.FromSeconds(120)); try { wait.Until(ExpectedConditions.UrlContains(urlEntrada)); WriteLog.SalvaLog("S"); } catch (Exception) { WriteLog.SalvaLog("N"); throw; } }
public void lotterypayment(ChromeDriver _chrome, string xpath) { Thread.Sleep(1000); _chrome.FindElementByCssSelector(xpath).Click(); try { PaginaBase.ExpectedElement(_chrome, "//*[@id=\"modal-10611\"]/div/h4", tipo.XPath); AjustClick.ClickByXPath("//*[@id=\"modal-10611\"]/div/a/i", _chrome); //add ex informando que esta n pagina receber boleto PaginaBase.GaveGood(_chrome, pessoa, log); _chrome.Navigate().Back(); } catch (Exception) { Thread.Sleep(1000); _chrome.FindElementByCssSelector("#fade-1 > div:nth-child(2) > div > a:nth-child(1)").Click(); AjustClick.ClickByXPath("//*[@id=\"informar-dados\"]/div[2]/div[1]/div[1]/label[1]", _chrome); if (PaginaBase.ExpectedElement(_chrome, "email", tipo.Id)) { _chrome.FindElementByCssSelector("#informar-dados > div.modal-content > div:nth-child(2) > div.col.l12.m12.s12.left-align > label:nth-child(2)").Click(); AjustSendKeys.SendKeysById("email", "*****@*****.**", _chrome); AjustSendKeys.SendKeysById("telefone", "41999999999", _chrome); PaginaBase.GaveGood(_chrome, pessoa, log); _chrome.FindElementByCssSelector("#informar-dados > div.modal-content > div:nth-child(3) > div > button").Click(); if (PaginaBase.ExpectedUrl(_chrome, "return-payment")) { } else { PaginaBase.Fail(); } } else { PaginaBase.Fail(); } for (int i = 0; i < 2; i++) { _chrome.Navigate().Back(); } } }
public void Atendimento(ChromeDriver _chrome) { try { if (PagBase.ExpectedUrl(_chrome, "atendimento")) { AjustClick.ClickById("btnChat", _chrome); if (PagBase.ExpectedUrl(_chrome, "srvcloo2.callflex.com.br")) { PagBase.GaveGood(_chrome, pessoa, log); _chrome.Navigate().Back(); } else { PagBase.Fail(); } AjustClick.ClickById("btnWhatsApp", _chrome); if (PagBase.ExpectedUrl(_chrome, "api.whatsapp.com")) { PagBase.GaveGood(_chrome, pessoa, log); _chrome.Navigate().Back(); } else { PagBase.Fail(); } AjustClick.ClickById("btnEmail1", _chrome); AjustSendKeys.SendKeysById("email-formr", pessoa.Email, _chrome); AjustClick.ClickById("btnAtendimentoEmail", _chrome); AjustClick.ClickByXPath("/html/body/div[3]/div/div/div[2]/button", _chrome); AjustClick.ClickById("btnAtendimento", _chrome); AjustClick.ClickById("btnLigacao", _chrome); AjustSendKeys.SendKeysById("phone-formr", pessoa.Phone, _chrome); AjustClick.ClickById("btnTelefone", _chrome); AjustClick.ClickByXPath("/html/body/div[3]/div/div/div[2]/button", _chrome); PagBase.GaveGood(_chrome, pessoa, log); } } catch (Exception) { PagBase.Error(_chrome, pessoa, log); } }
public void FullFlow(ChromeDriver _chrome) { try { log.data_ini = pagbase.InserTimeIn(); log.idportal = Convert.ToInt32(Portal.Claro); pagbase.InsertPhone(); _chrome.Navigate().GoToUrl(new Constants().Claro_url); if (!pagbase.ValidateNotFound(_chrome, log)) { return; } AjustClick.ClickByXPath("/html/body/div[4]/div[3]/button", _chrome); Thread.Sleep(1000); pagbase.GaveGood(_chrome, pessoa, log); } catch (Exception e) { pagbase.Error(_chrome, pessoa, log); throw; } }
public void OpenSubtitleTeste() { chromedriver.Navigate().GoToUrl(urlLogin); AjustClick.ClickByClassName("bt-dwl", chromedriver); AjustClick.ClickByClassName("disable_ad", chromedriver); AjustSendKeys.SendKeysByName("user", LoginOs, chromedriver); AjustSendKeys.SendKeysById("password", SenhaOs, chromedriver); AjustClick.ClickByXPath("//*[@id=\"loginform\"]/table/tbody/tr[4]/td/input", chromedriver); var wait = new WebDriverWait(chromedriver, TimeSpan.FromSeconds(60)); try { //wait.Until(ExpectedConditions.ElementIsVisible(d => d.FindElement(By.XPath("//div[@id='timeLeft']")("//*[@id=\"logindetail\"]/a[2]")); WriteLog.SalvaLog("S"); } catch (Exception) { WriteLog.SalvaLog("N"); throw; } }