public OptionLink4(int _year, string _make, string _model, Link4VehicleVariant _variant)
 {
     this.year = _year;
     this.make = _make;
     this.model = _model;
     this.version = _variant._version;
     this.volume = _variant._volume;
     this.power = _variant._power;
     this.body = _variant._body;
 }
        public void Quote(Link4QuotationParams quotationParams)
        {
            SeleniumUtils.GetElement(By.LinkText("Sprawdź: Kalkulator OC i AC"), _driver).Click();

            new SelectElement(SeleniumUtils.GetElement(By.Id("vehicleTypeSelect"), _driver)).SelectByText(quotationParams._vehicleType);
            new SelectElement(SeleniumUtils.GetElement(By.Id("modelYearSelect"), _driver)).SelectByText(quotationParams._modelYearSelect);
            IList<IWebElement> makes = GetMakes();
            foreach (IWebElement make in makes) {
                if (make.Text == quotationParams._manufactureSelect) {
                    make.Click();
                    break;
                }
            }

            IList<IWebElement> models = GetModels();
            foreach (IWebElement model in models) {
                if (model.Text == quotationParams._modelSelect) {
                    model.Click();
                    break;
                }
            }

            IList<IWebElement> variants = SeleniumUtils.GetElements(By.XPath("//*[@id='variantPanel']/div[2]/div[1]/div/div/div/div"), _driver);
            foreach (IWebElement variant in variants) {
                Link4VehicleVariant iterVariant = new Link4VehicleVariant(variant);
                if (thisVariant.Equals(iterVariant)) {
                    variant.Click();
                    break;
                }
            }
            SeleniumUtils.GetElement(By.Id("currentMileage"), _driver).Click();
            SeleniumUtils.GetElement(By.Id("currentMileage"), _driver).SendKeys(quotationParams._currentMileage);
            new SelectElement(SeleniumUtils.GetElement(By.Id("policy.asset.kmPerYear.id"), _driver)).SelectByText(quotationParams._kmPerYear);
            new SelectElement(SeleniumUtils.GetElement(By.Id("policy.asset.vehicleOrigin.id"), _driver)).SelectByText(quotationParams._vehicleOrigin);
            new SelectElement(SeleniumUtils.GetElement(By.Id("policy.asset.vehicleUsage.id"), _driver)).SelectByText(quotationParams._vehicleUsage);
            new SelectElement(SeleniumUtils.GetElement(By.Id("parkingPlaceSelect"), _driver)).SelectByText(quotationParams._parkingPlace);
            new SelectElement(SeleniumUtils.GetElement(By.Id("policy.asset.useFrequency.id"), _driver)).SelectByText(quotationParams._useFrequency);
            SeleniumUtils.GetElement(By.XPath("//*[@id='policy.asset.vehiclePriorDamages.id1']"), _driver).FindElement(By.XPath("../label")).Click();
            SeleniumUtils.GetElement(By.Id("ownedFromYear"), _driver).Click();
            SeleniumUtils.GetElement(By.Id("ownedFromYear"), _driver).SendKeys(quotationParams._ownedFromYear);
            new SelectElement(SeleniumUtils.GetElement(By.Id("policy.asset.vehicleAbroadUsage.id"), _driver)).SelectByText(quotationParams._vehicleAbroadUsage);
            SeleniumUtils.GetElement(By.Id("isOneOwner1"), _driver).FindElement(By.XPath("../label")).Click();
            new SelectElement(SeleniumUtils.GetElement(By.Id("anotherDriversNumberSelect"), _driver)).SelectByText(quotationParams._anotherDriversNumberSelect);
            new SelectElement(SeleniumUtils.GetElement(By.Id("existingClient"), _driver)).SelectByText("Nie");
            SeleniumUtils.GetElement(By.Name("mainDriver.contact.firstName"), _driver).Clear();
            SeleniumUtils.GetElement(By.Name("mainDriver.contact.firstName"), _driver).SendKeys(quotationParams._firstName);
            SeleniumUtils.GetElement(By.Name("mainDriver.contact.name"), _driver).Clear();
            SeleniumUtils.GetElement(By.Name("mainDriver.contact.name"), _driver).SendKeys(quotationParams._name);
            SeleniumUtils.GetElement(By.Id("driverDateOfBirth"), _driver).Clear();
            SeleniumUtils.GetElement(By.Id("driverDateOfBirth"), _driver).SendKeys(quotationParams._dateOfBirth);
            SeleniumUtils.GetElement(By.Id("mainDriver.contact.person.gender.id1"), _driver).FindElement(By.XPath("../label")).Click();
            new SelectElement(SeleniumUtils.GetElement(By.Id("mainDriver.contact.person.familyStatus.id"), _driver)).SelectByText(quotationParams._familyStatus);
            new SelectElement(SeleniumUtils.GetElement(By.Id("drivingExperienceSelect"), _driver)).SelectByText(quotationParams._drivingExperienceSelect);
            new SelectElement(SeleniumUtils.GetElement(By.Id("mainDriverPolicyContact.tplInsuranceYearsCount.id"), _driver)).SelectByText(quotationParams._tplInsuranceYearsCount);
            new SelectElement(SeleniumUtils.GetElement(By.Id("mainDriverPolicyContact.acInsuranceYearsCount.id"), _driver)).SelectByText(quotationParams._acInsuranceYearsCount);
            new SelectElement(SeleniumUtils.GetElement(By.Id("tplClaimsCountLastThreeYearsMainDriver"), _driver)).SelectByText(quotationParams._tplClaimsCountLastThreeYearsMainDriver);
            new SelectElement(SeleniumUtils.GetElement(By.Id("acClaimsCountLastThreeYearsMainDriver"), _driver)).SelectByText(quotationParams._acClaimsCountLastThreeYearsMainDriver);
            SeleniumUtils.GetElement(By.Id("zipCodeInput"), _driver).Click();
            SeleniumUtils.GetElement(By.Id("zipCodeInput"), _driver).SendKeys(quotationParams._zipCodeInput);
            SeleniumUtils.GetElement(By.Id("poleMobilePhoneNumber"), _driver).Click();
            SeleniumUtils.GetElement(By.Id("poleMobilePhoneNumber"), _driver).SendKeys(quotationParams._mobilePhoneInput);
            SeleniumUtils.GetElement(By.Id("mainDriverEmail"), _driver).Click();
            SeleniumUtils.GetElement(By.Id("mainDriverEmail"), _driver).SendKeys("*****@*****.**");
            SeleniumUtils.GetElement(By.Id("startDate"), _driver).Click();
            SeleniumUtils.GetElement(By.Id("startDate"), _driver).SendKeys(quotationParams._startDate);
            SeleniumUtils.GetElement(By.Id("selectAll"), _driver).Click();
            SeleniumUtils.GetElement(By.Id("selectAll"), _driver).Click();
            SeleniumUtils.GetElement(By.Id("next_button"), _driver).Click();

            _quotationResult.var1 = SeleniumUtils.GetElement(By.XPath("//*[@id='promo_1']/div/header/p[2]"), _driver).Text;
            _quotationResult.var2 = SeleniumUtils.GetElement(By.XPath("//*[@id='promo_2']/div/header/p[2]"), _driver).Text;
            _quotationResult.var3 = SeleniumUtils.GetElement(By.XPath("//*[@id='promo_3']/div/header/p[2]"), _driver).Text;
        }