Пример #1
0
        /// <summary>
        /// Fillout JD data in Auto offer page.
        /// </summary>
        /// <param name="jointDebtor"></param>
        internal void FilloutJDData(AutoOffer jointDebtor)
        {
            this.Type(this.JDTotalIncomes, jointDebtor.TotalIncomes);
            this.Type(this.JDTotalDebts, jointDebtor.TotalDebts);
            this.Type(this.JDTotalExpenses, jointDebtor.TotalExpenses);
            this.Type(this.JDCurrentWorkingTime, jointDebtor.CurrentJobTimeWorking);
            if (jointDebtor.IsForigner)
            {
                if (!this.JDisForeigner.Selected)
                {
                    this.JDisForeigner.Click();
                }
            }

            try
            {
                Assert.IsTrue(!this.JDAge.GetAttribute("value").Equals(string.Empty), "Field JD Age is not automatically fillout.");
            }
            catch (System.Exception c)
            {
                List <string> msg = new List <string>();
                msg.Add(c.ToString());
            }

            this.Type(this.JDFirstName, jointDebtor.FirstName);
            this.Type(this.JDSecondName, jointDebtor.SecondName);
            this.Type(this.JDLastName, jointDebtor.LastName);
            this.Type(this.JDPhone, jointDebtor.Phone);
        }
Пример #2
0
        /// <summary>
        /// Fillout Client data in Auto offer page.
        /// </summary>
        /// <param name="client"></param>
        internal void FilloutClientData(AutoOffer client)
        {
            this.Type(this.RequeredPayment, client.RequestedPayment);
            this.Type(this.RequeredAmount, client.RequestedLoanAmount);
            this.SelectByText(this.RequeredRate, client.RequestedRate);

            this.Type(this.TotalIncomes, client.TotalIncomes);

            if (client.HasUnofficialIncomes)
            {
                this.HasUnofficialIncomes.Click();
            }

            this.Type(this.OtherIncomes, client.OtherIncomes);
            this.Type(this.TotalDebts, client.TotalDebts);
            this.Type(this.TotalExpenses, client.TotalExpenses);
            this.Type(this.CurrentWorkingTime, client.CurrentJobTimeWorking);
            if (client.IsForigner)
            {
                if (!this.IsForeigner.Selected)
                {
                    this.IsForeigner.Click();
                }
            }

            try
            {
                Assert.IsTrue(!this.Age.GetAttribute("value").Equals(string.Empty), "Field Age is not automatically fillout.");
            }
            catch (System.Exception c)
            {
                List <string> msg = new List <string>();
                msg.Add(c.ToString());
            }

            this.Type(this.FirstName, client.FirstName);
            this.Type(this.SecondName, client.SecondName);
            this.Type(this.LastName, client.LastName);
            this.Type(this.Phone, client.Phone);

            if (client.InternalRefinancing)
            {
                this.InternalRefinancing.Click();

                // TO DO!
            }

            if (client.ExternalRefinancing)
            {
                this.ExternalRefinancing.Click();
                this.Type(this.RefinancingRemainingDebt, client.RemainingDebt);
                this.Type(this.RefinancingMonthlyPayment, client.RemainingDebtPayment);
            }
        }
Пример #3
0
        /// <summary>
        /// Insert Client data in fields and click on button check.
        /// </summary>
        /// <param name="client"></param>
        internal void CheckClientPid(AutoOffer client)
        {
            if (client.IsForigner)
            {
                this.ClientForeigner.Click();
            }

            this.Type(this.ClientPID, client.Pid);

            this.Check.Click();
        }
Пример #4
0
        public void CheckPidUnder18Client()
        {
            AutoOffer under18ClientPid = new AutoOffer();
            AutoOffer validJDPid       = new AutoOffer();

            under18ClientPid.Pid = "0346136118 ";
            validJDPid.Pid       = "0743144618";

            this.offerMainPage.NewOffer.Click();
            this.autoOffer.CheckClientPid(under18ClientPid);
            this.autoOffer.CheckJDPid(validJDPid);
            Thread.Sleep(1000);
            this.autoOffer.AssertPidValidation();
        }
Пример #5
0
        public void CheckPidInvalidJDPid()
        {
            AutoOffer validClientPid = new AutoOffer();
            AutoOffer invalidJDPid   = new AutoOffer();

            validClientPid.Pid = "6312168899";
            invalidJDPid.Pid   = "0710128595";

            this.offerMainPage.NewOffer.Click();
            this.autoOffer.CheckClientPid(validClientPid);
            this.autoOffer.CheckJDPid(invalidJDPid);
            Thread.Sleep(1000);
            this.autoOffer.AssertPidValidation();
        }
Пример #6
0
        public void CheckPidInvalidPids()
        {
            AutoOffer invalidClientPid = new AutoOffer();
            AutoOffer invalidJDPid     = new AutoOffer();

            invalidClientPid.Pid = "0000001212";
            invalidJDPid.Pid     = "0710128595";

            this.offerMainPage.NewOffer.Click();
            this.autoOffer.CheckClientPid(invalidClientPid);
            this.autoOffer.AssertPidValidation();
            this.autoOffer.CheckJDPid(invalidJDPid);
            this.autoOffer.AssertPidValidation();
        }
Пример #7
0
        /// <summary>
        /// Create Offer with JD.
        /// Insert Joint Debtor data in fields and click on button check.
        /// </summary>
        /// <param name="jointDebtor"></param>
        internal void CheckJDPid(AutoOffer jointDebtor)
        {
            Thread.Sleep(500);
            while (!this.HasCodebtor.Selected)
            {
                this.HasCodebtor.Click();
            }

            if (jointDebtor.IsForigner)
            {
                this.JDForeigner.Click();
            }

            this.Type(this.JDPID, jointDebtor.Pid);

            this.Check.Click();
            this.Check.Click();
        }