public bool ClicarSolicitarCredito()
        {
            bool _result = false;

            try
            {
                IWebElement BtnQueroSolicitar = ClassDriver.GetInstance().Driver.FindElement(By.XPath("//a[@class='btn btn-laranja btn-line-wrap btn-destaque btn-block']"));
                util.WaitForElementVisible(BtnQueroSolicitar, 15);
                if (BtnQueroSolicitar.Displayed)
                {
                    //Clicar com JavaScript
                    util.ClickJS(BtnQueroSolicitar);
                    _result = true;
                }
                else
                {
                    ClassInfo.GetInstance().LogMessage = "Erro else";
                }
            }
            catch
            {
                ClassInfo.GetInstance().LogMessage = "Erro try";
            }
            return(_result);
        }
Esempio n. 2
0
        public bool PreencherDadosFiador()
        {
            bool _result = false;

            string rg = util.GerarRg();

            try
            {
                util.WaitForElementVisible(InputRg, 15);
                if (InputRg.Displayed)
                {
                    InputRg.Click();
                    Thread.Sleep(300);
                    InputRg.SendKeys(rg);
                    Thread.Sleep(300);
                    util.ClickJS(RadioNacio);
                    Thread.Sleep(300);
                    InputNomeMae.Click();
                    Thread.Sleep(300);
                    InputNomeMae.SendKeys(massa.nomeMae);
                    Thread.Sleep(300);
                    ListEstCivil.Click();
                    Thread.Sleep(300);
                    var selectElement = new SelectElement(ListEstCivil);
                    selectElement.SelectByIndex(1);
                    ListEstCivil.Click();
                    Thread.Sleep(300);
                    util.ClickJS(RadioUniao);
                    Thread.Sleep(300);
                    SelectProfissao.Click();
                    Thread.Sleep(300);
                    OptProfissao.Click();
                    Thread.Sleep(300);

                    _result = true;
                }
            }
            catch
            {
            }
            return(_result);
        }