コード例 #1
0
        public bool PreencherContatoEndereco()
        {
            bool _result = false;

            try
            {
                util.WaitForElementVisible(InputDdd, 15);
                if (InputDdd.Displayed)
                {
                    InputDdd.Click();
                    Thread.Sleep(300);
                    InputDdd.SendKeys(massa.ddd);
                    Thread.Sleep(300);
                    InputTel.Click();
                    Thread.Sleep(300);
                    InputTel.SendKeys(massa.numTel);
                    Thread.Sleep(300);
                    InputRamal.Click();
                    Thread.Sleep(300);
                    InputRamal.SendKeys(massa.ramal);
                    Thread.Sleep(300);
                    util.ClickJS(InputCep);
                    Thread.Sleep(300);
                    InputCep.SendKeys(massa.cep);
                    Thread.Sleep(2000);
                    util.ScrollElementoPage(BtnBuscarCep);
                    Thread.Sleep(2000);
                    BtnBuscarCep.Click();
                    Thread.Sleep(2000);
                    util.ScrollElementoPage(InputNumEnder);
                    InputNumEnder.Click();
                    Thread.Sleep(300);
                    InputNumEnder.SendKeys(massa.numero);
                    Thread.Sleep(300);
                    InputComplemento.Click();
                    Thread.Sleep(300);
                    InputComplemento.SendKeys(massa.complemento);

                    _result = true;
                }
            }
            catch
            {
            }
            return(_result);
        }
コード例 #2
0
        private void btnAnnuler_Click(object sender, EventArgs e)
        {
            // rendre interface d'ajout
            // effacer les champs
            // testé et validé !
            bunifuTransition1.HideSync(bunifuShadowPanel1, false, BunifuAnimatorNS.Animation.HorizSlide);
            bunifuButton4.Visible   = false;
            this.Ajouter.ButtonText = "Ajouter un Ingenieur";
            this.Ajouter.Location   = new System.Drawing.Point(343, 67);
            this.Ajouter.Size       = new System.Drawing.Size(150, 32);
            if (InputCode.Enabled.Equals(false))
            {
                this.Ajouter.Click -= new EventHandler(Modifier_Click);
                this.Ajouter.Click += new EventHandler(Ajouter_Click);
                InputCode.Enabled   = true;
            }
            InputCode.ResetText();
            InputNom.ResetText();
            InputTel.ResetText();

            bunifuTransition1.ShowSync(bunifuShadowPanel1, false, BunifuAnimatorNS.Animation.HorizSlide);
        }
        public bool PreencherContatoEndereco()
        {
            bool _result = false;

            try
            {
                util.WaitForElementVisible(InputDdd, 15);
                if (InputDdd.Displayed)
                {
                    InputDdd.Click();
                    Thread.Sleep(300);
                    InputDdd.SendKeys(massa.ddd);
                    Thread.Sleep(300);
                    InputTel.Click();
                    Thread.Sleep(300);
                    InputTel.SendKeys(massa.numTel);
                    Thread.Sleep(300);
                    InputRamal.Click();
                    Thread.Sleep(300);
                    InputRamal.SendKeys(massa.ramal);
                    Thread.Sleep(300);
                    util.ClickJS(InputCep);
                    Thread.Sleep(300);
                    InputCep.SendKeys(massa.cep);
                    Thread.Sleep(2000);
                    util.ScrollElementoPage(BtnBuscarCep);
                    Thread.Sleep(2000);
                    //BtnBuscarCep.Click();
                    Thread.Sleep(500);
                    util.ScrollElementoPage(InputNumEnder);
                    InputNumEnder.Click();
                    Thread.Sleep(300);
                    InputNumEnder.SendKeys(massa.numero);
                    Thread.Sleep(300);
                    InputComplemento.Click();
                    Thread.Sleep(300);
                    InputComplemento.SendKeys(massa.complemento);

                    Campoendereco.Clear();
                    Campoendereco.Click();
                    Campoendereco.SendKeys("Av Júlio De Castilhos");
                    Thread.Sleep(300);

                    CampoBairro.Clear();
                    CampoBairro.Click();
                    CampoBairro.SendKeys("Centro Histórico");
                    Thread.Sleep(300);

                    CampoCidade.Clear();
                    CampoCidade.Click();
                    CampoCidade.SendKeys("Porto Alegre");
                    Thread.Sleep(300);

                    var selectElement = new SelectElement(SelectUf);
                    selectElement.SelectByIndex(21);

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