public void CadastrarFatorDaTabelaDePreco(string Midia, string Fator) { var BtnAdicionarFator = Element.Css("i[uib-tooltip='Novo']"); MouseActions.ClickATM(Browser, BtnAdicionarFator); var InpMidia = Element.Css("input[ng-model='FatorDados.DscMidia']"); AutomatedActions.SendDataATM(Browser, InpMidia, Midia); MouseActions.ClickATM(Browser, Element.Xpath("//strong[text()='" + Midia + "']")); var InpFator = Element.Css("input[ng-model='FatorDados.Valor']"); ElementExtensions.IsElementVisible(InpFator, Browser); if (Fator == "Fator") { AutomatedActions.SendData(Browser, InpFator, Convert.ToString(FakeHelpers.RandomNumber(10))); } else { AutomatedActions.SendData(Browser, InpFator, Fator); } KeyboardActions.Tab(Browser, InpFator); MouseActions.ClickATM(Browser, BtnSalvarFator); }
public void AlterarFatorDaTabelaDePreco(string Fator, string Valor) { var fatorAlt = Element.Xpath("//strong[contains (., '" + Fator + "')]/../../..//i[@ng-click='ModalFatorTbPreco(item)']"); try { MouseActions.ClickATM(Browser, fatorAlt); } catch { Thread.Sleep(2000); MouseActions.ClickATM(Browser, fatorAlt); } var InpFator = Element.Css("input[ng-model='FatorDados.Valor']"); ElementExtensions.IsElementVisible(InpFator, Browser); Thread.Sleep(2000); KeyboardActions.ControlA(Browser, InpFator); if (Valor == "Valor") { AutomatedActions.SendData(Browser, InpFator, Convert.ToString(FakeHelpers.RandomNumber(10))); } else { AutomatedActions.SendData(Browser, InpFator, Valor); } KeyboardActions.Tab(Browser, InpFator); MouseActions.ClickATM(Browser, BtnSalvarFator); }
private void CamposTabelaDePreco(string Genero, string Sincronismo, string Nacionalidade) { var campo = Element.Css("input[genero='" + Genero + "'][sincronismo='" + Sincronismo + "'][onchange='AddItem" + Nacionalidade + "(this)']"); KeyboardActions.ControlA(Browser, campo); AutomatedActions.SendData(Browser, campo, Convert.ToString(FakeHelpers.RandomNumber(100))); KeyboardActions.Tab(Browser, campo); }
private void PreencherDadosGeraisCenaContinuidade(string horaCenica) { InputHoraCenica.EsperarElemento(Browser); if (InputHoraCenica.IsElementVisible(Browser)) { AutomatedActions.SendDataATM(Browser, InputHoraCenica, horaCenica); } AutomatedActions.SendDataATM(Browser, InputDiaCenico, FakeHelpers.RandomNumber().ToString()); AutomatedActions.SendDataATM(Browser, InputSequencia, FakeHelpers.FirstName()); AutomatedActions.SendDataATM(Browser, InputObsContinuidade, FakeHelpers.FullName()); AutomatedActions.SendDataATM(Browser, InputObsGeral, FakeHelpers.FullName()); AutomatedActions.SendDataATM(Browser, InputObsContArte, FakeHelpers.FullName()); }