public string FTP_ChesterfieldVA(string streetno, string direction, string streetname, string city, string streettype, string unitnumber, string ownernm, string parcelNumber, string searchType, string orderNumber, string directParcel) { GlobalClass.global_orderNo = orderNumber; HttpContext.Current.Session["orderNo"] = orderNumber; GlobalClass.global_parcelNo = parcelNumber; List <string> taxinformation = new List <string>(); string StartTime = "", AssessmentTime = "", TaxTime = "", CitytaxTime = "", LastEndTime = ""; string As_of = "", Total_Due = "", MillLevy = "", Class = "", YearBuilt = "", subdivision = ""; List <string> pdflink = new List <string>(); string Parcel_number = "", Tax_Authority = "", type = "", AddressCombain = "", Addresshrf = "", Pin = "", address = "", MailingAddress = "", Constructed = ""; var driverService = PhantomJSDriverService.CreateDefaultService(); driverService.HideCommandPromptWindow = true; //driver = new PhantomJSDriver(); //driver = new ChromeDriver() using (driver = new PhantomJSDriver()) { if (direction != "") { address = streetno.Trim() + " " + direction.Trim() + " " + streetname.Trim() + " " + streettype.Trim(); } else { address = streetno.Trim() + " " + streetname.Trim() + " " + streettype.Trim(); } if (searchType == "titleflex") { gc.TitleFlexSearch(orderNumber, "", ownernm, address, "VA", "Chesterfield"); if ((HttpContext.Current.Session["TitleFlex_Search"] != null && HttpContext.Current.Session["TitleFlex_Search"].ToString() == "Yes")) { return("MultiParcel"); } searchType = "parcel"; parcelNumber = HttpContext.Current.Session["titleparcel"].ToString().Replace(".", ""); } try { StartTime = DateTime.Now.ToString("HH:mm:ss"); driver.Navigate().GoToUrl("https://www.chesterfield.gov/828/Real-Estate-Assessment-Data#/"); if (searchType == "address") { driver.FindElement(By.Id("searchText")).SendKeys(address); Thread.Sleep(4000); gc.CreatePdf_WOP(orderNumber, "Address Search", driver, "VA", "Chesterfield"); driver.FindElement(By.XPath("//*[@id='read-search-toolbar']/div/div/div/button[2]/div/i")).Click(); Thread.Sleep(6000); gc.CreatePdf_WOP(orderNumber, "Address After", driver, "VA", "Chesterfield"); string Recored1 = driver.FindElement(By.XPath("//*[@id='read-content']/main/div/div/div[2]/div[2]/div/div/div/div[6]")).Text; string Recored = GlobalClass.Before(Recored1, "records"); if (Recored.Trim().Contains("1")) { driver.FindElement(By.XPath("//*[@id='read-content']/main/div/div/div[2]/div[2]/div/div/div/div[3]/a/div/div/div[2]")).Click(); Thread.Sleep(2000); } if (!Recored.Trim().Contains("1")) { int Max = 0; //*[@id="read-content"]/main/div/div/div[2]/div[2]/div/div/div IWebElement Multipletable = driver.FindElement(By.XPath("//*[@id='read-content']/main/div/div/div[2]/div[2]/div/div/div")); IList <IWebElement> Multiplerow = Multipletable.FindElements(By.TagName("div")); IList <IWebElement> Multipleid; foreach (IWebElement assessment in Multiplerow) { Multipleid = assessment.FindElements(By.TagName("div")); if (Multipleid.Count == 3 && !assessment.Text.Contains("bedroom(s)") && assessment.Text.Trim() != "" && assessment.Text.Contains("Parcel ID:")) { //string Adres1 = Multipleid[5].Text; string addres = Multipleid[0].Text; string Parcel1 = Multipleid[2].Text; string Parcel = GlobalClass.After(Parcel1, "Parcel ID:"); string Multipleresult = addres + "~" + Parcel; gc.insert_date(orderNumber, Parcel, 2154, Multipleresult, 1, DateTime.Now); Max++; } } if (Max > 1 && Max < 26) { HttpContext.Current.Session["multiparcel_Chesterfield"] = "Yes"; driver.Quit(); return("MultiParcel"); } if (Max > 25) { HttpContext.Current.Session["multiParcel_Chesterfield_Multicount"] = "Maximum"; driver.Quit(); return("Maximum"); } } // gc.CreatePdf_WOP(orderNumber, "Address Search", driver, "VA", "Chesterfield"); try { string Nodata = driver.FindElement(By.XPath("//*[@id='read-content']/main/div/div/div[2]/div[2]/div/div/div/div")).Text; if (Nodata.Contains("No results were found")) { HttpContext.Current.Session["Zero_Chesterfield"] = "Zero"; return("No Data Found"); } } catch { } } if (searchType == "parcel") { driver.FindElement(By.Id("searchText")).SendKeys(parcelNumber); Thread.Sleep(4000); gc.CreatePdf(orderNumber, parcelNumber, "Parcel Search", driver, "VA", "Chesterfield"); driver.FindElement(By.XPath("//*[@id='read-search-toolbar']/div/div/div/button[2]/div/i")).Click(); Thread.Sleep(6000); gc.CreatePdf(orderNumber, parcelNumber, "Parcel Search After", driver, "VA", "Chesterfield"); driver.FindElement(By.XPath("//*[@id='read-content']/main/div/div/div[2]/div[2]/div/div/div/div[3]/a/div/div/div[2]/div/div[4]/ul[1]")).Click(); Thread.Sleep(8000); gc.CreatePdf(orderNumber, parcelNumber, "Parcel Search click After", driver, "VA", "Chesterfield"); } if (searchType == "Block") { driver.FindElement(By.Id("searchText")).SendKeys(unitnumber); Thread.Sleep(4000); gc.CreatePdf(orderNumber, parcelNumber, "Parcel Search", driver, "VA", "Chesterfield"); driver.FindElement(By.XPath("//*[@id='read-search-toolbar']/div/div/div/button[2]/div/i")).Click(); Thread.Sleep(6000); gc.CreatePdf(orderNumber, parcelNumber, "Parcel Search After", driver, "VA", "Chesterfield"); driver.FindElement(By.XPath("//*[@id='read-content']/main/div/div/div[2]/div[2]/div/div/div/div[3]/a/div/div/div[2]/div/div[4]/ul[1]")).Click(); Thread.Sleep(8000); gc.CreatePdf(orderNumber, parcelNumber, "Parcel Search click After", driver, "VA", "Chesterfield"); } Parcel_number = driver.FindElement(By.Id("parcelNumber")).Text; string RealEstateAccount = driver.FindElement(By.Id("accountNumber")).Text; string PropertyClass = driver.FindElement(By.Id("propClass")).Text; string MagisterialDistrict = driver.FindElement(By.Id("magDistrict")).Text; try { subdivision = driver.FindElement(By.Id("subdivision")).Text; } catch { } string DeededAcreage = driver.FindElement(By.Id("acres")).Text; string ownerName = driver.FindElement(By.Id("ownerName")).Text; string MailingAddress1 = driver.FindElement(By.Id("mailingAddress")).Text; string MailingAddress2 = driver.FindElement(By.Id("mailingAddressLine2")).Text; string MailingAddress3 = MailingAddress1 + " " + MailingAddress2; string OwnershipType = driver.FindElement(By.Id("ownershipType")).Text; string legalDescription = driver.FindElement(By.Id("legalDescription")).Text; gc.CreatePdf(orderNumber, parcelNumber, "Overview", driver, "VA", "Chesterfield"); IJavaScriptExecutor js = driver as IJavaScriptExecutor; //*[@id="read-content"]/div[4]/div/div/div[1]/div/div/div IWebElement Assessmentslink = driver.FindElement(By.XPath("//*[@id='read-content']/div[4]/div/div/div[1]/div/div/div")); IList <IWebElement> IChargesRow = Assessmentslink.FindElements(By.TagName("div")); IList <IWebElement> IChargesTD; foreach (IWebElement charge in IChargesRow) { IChargesTD = charge.FindElements(By.TagName("a")); if (IChargesTD.Count != 0) { try { string strcharges = IChargesTD[0].GetAttribute("innerText"); if (strcharges.Contains("RESIDENTIAL")) { IWebElement IChargesSearch = IChargesTD[0]; js.ExecuteScript("arguments[0].click();", IChargesSearch); Thread.Sleep(3000); break; } } catch { } } } Thread.Sleep(2000); gc.CreatePdf(orderNumber, parcelNumber, "Residential", driver, "VA", "Chesterfield"); try { YearBuilt = driver.FindElement(By.Id("yearBuilt_0")).Text; } catch { } string Propertydetail = RealEstateAccount + "~" + PropertyClass + "~" + MagisterialDistrict + "~" + subdivision + "~" + DeededAcreage + "~" + ownerName + "~" + MailingAddress3 + "~" + OwnershipType + "~" + legalDescription + "~" + YearBuilt; gc.insert_date(orderNumber, Parcel_number, 2140, Propertydetail, 1, DateTime.Now); // Assessmentslink.Click(); //Thread.Sleep(2000); IWebElement Assessmentslink1 = driver.FindElement(By.XPath("//*[@id='read-content']/div[4]/div/div/div[1]/div/div/div")); IList <IWebElement> IChargesRow1 = Assessmentslink1.FindElements(By.TagName("div")); IList <IWebElement> IChargesTD1; foreach (IWebElement charge1 in IChargesRow1) { IChargesTD1 = charge1.FindElements(By.TagName("a")); if (IChargesTD1.Count != 0) { try { string strcharges = IChargesTD1[0].GetAttribute("innerText"); if (strcharges.Contains("ASSESSMENTS")) { IWebElement IChargesSearch = IChargesTD1[0]; js.ExecuteScript("arguments[0].click();", IChargesSearch); Thread.Sleep(3000); break; } } catch { } } } Thread.Sleep(2000); gc.CreatePdf(orderNumber, parcelNumber, "Assessment", driver, "VA", "Chesterfield"); IWebElement Assessmenttable = driver.FindElement(By.XPath("//*[@id='tab_Assessments']/div/div[2]/div/div[1]/div/table/tbody")); IList <IWebElement> Assessmentrow = Assessmenttable.FindElements(By.TagName("tr")); IList <IWebElement> assessmentid; foreach (IWebElement assessment in Assessmentrow) { assessmentid = assessment.FindElements(By.TagName("td")); if (assessmentid.Count != 0 && !assessment.Text.Contains("Assessment Year:") && assessment.Text.Trim() != "") { string Assessmentresult = assessmentid[1].Text + "~" + assessmentid[2].Text + "~" + assessmentid[3].Text + "~" + assessmentid[4].Text + "~" + assessmentid[5].Text + "~" + assessmentid[6].Text; gc.insert_date(orderNumber, Parcel_number, 2141, Assessmentresult, 1, DateTime.Now); } } IWebElement Assessmentslink2 = driver.FindElement(By.XPath("//*[@id='read-content']/div[4]/div/div/div[1]/div/div/div")); IList <IWebElement> IChargesRow2 = Assessmentslink2.FindElements(By.TagName("div")); IList <IWebElement> IChargesTD2; foreach (IWebElement charge2 in IChargesRow2) { IChargesTD2 = charge2.FindElements(By.TagName("a")); if (IChargesTD2.Count != 0) { try { string strcharges = IChargesTD2[0].GetAttribute("innerText"); if (strcharges.Contains("IMPROVEMENTS")) { IWebElement IChargesSearch = IChargesTD2[0]; js.ExecuteScript("arguments[0].click();", IChargesSearch); Thread.Sleep(3000); break; } } catch { } } } gc.CreatePdf(orderNumber, parcelNumber, "Improvements", driver, "VA", "Chesterfield"); IWebElement Improvementtable = driver.FindElement(By.XPath("//*[@id='tab_Improvements']/div/div[2]/div/div[1]/div/table/tbody")); IList <IWebElement> Improvementrow = Improvementtable.FindElements(By.TagName("tr")); IList <IWebElement> Improvementid; foreach (IWebElement Improvement in Improvementrow) { Improvementid = Improvement.FindElements(By.TagName("td")); if (Improvementid.Count > 1) { string Improvementresult = Improvementid[0].Text + "~" + Improvementid[1].Text + "~" + Improvementid[2].Text + "~" + Improvementid[3].Text + "~" + Improvementid[4].Text + "~" + Improvementid[5].Text; gc.insert_date(orderNumber, Parcel_number, 2142, Improvementresult, 1, DateTime.Now); } } IWebElement Assessmentslink3 = driver.FindElement(By.XPath("//*[@id='read-content']/div[4]/div/div/div[1]/div/div/div")); IList <IWebElement> IChargesRow3 = Assessmentslink3.FindElements(By.TagName("div")); IList <IWebElement> IChargesTD3; foreach (IWebElement charge3 in IChargesRow3) { IChargesTD3 = charge3.FindElements(By.TagName("a")); if (IChargesTD3.Count != 0) { try { string strcharges = IChargesTD3[0].GetAttribute("innerText"); if (strcharges.Contains("LAND")) { IWebElement IChargesSearch = IChargesTD3[0]; js.ExecuteScript("arguments[0].click();", IChargesSearch); Thread.Sleep(3000); break; } } catch { } } } gc.CreatePdf(orderNumber, parcelNumber, "Land", driver, "VA", "Chesterfield"); string Deeded_Acreage = ""; IList <IWebElement> Acreslist = driver.FindElements(By.Id("acres")); foreach (IWebElement Acres in Acreslist) { string Deered = Acres.Text; if (Deered != "") { Deeded_Acreage = Deered; } } string floodPlain = driver.FindElement(By.Id("floodPlain")).Text; string Easement = driver.FindElement(By.Id("easement")).Text; string CountyWater = driver.FindElement(By.Id("countyWater")).Text; string CountySewer = driver.FindElement(By.Id("countySewer")).Text; string Well = driver.FindElement(By.Id("well")).Text; string Septic = driver.FindElement(By.Id("septic")).Text; string Gas = driver.FindElement(By.Id("gas")).Text; string electricity = driver.FindElement(By.Id("electricity")).Text; string PavedStreets = driver.FindElement(By.Id("pavedStreets")).Text; string StormDrains = driver.FindElement(By.Id("stormDrains")).Text; string curbing = driver.FindElement(By.Id("curbing")).Text; string Zoning = driver.FindElement(By.XPath("//*[@id='read-zoning']/div[2]/div/ul/li/div")).Text; string LandLinkresult = Deeded_Acreage + "~" + floodPlain + "~" + Easement + "~" + CountyWater + "~" + Well + "~" + Septic + "~" + Gas + "~" + electricity + "~" + PavedStreets + "~" + StormDrains + "~" + curbing + "~" + Zoning; gc.insert_date(orderNumber, Parcel_number, 2143, LandLinkresult, 1, DateTime.Now); IWebElement Assessmentslink4 = driver.FindElement(By.XPath("//*[@id='read-content']/div[4]/div/div/div[1]/div/div/div")); IList <IWebElement> IChargesRow4 = Assessmentslink4.FindElements(By.TagName("div")); IList <IWebElement> IChargesTD4; foreach (IWebElement charge4 in IChargesRow4) { IChargesTD4 = charge4.FindElements(By.TagName("a")); if (IChargesTD4.Count != 0) { try { string strcharges = IChargesTD4[0].GetAttribute("innerText"); if (strcharges.Contains("OWNERSHIP")) { IWebElement IChargesSearch = IChargesTD4[0]; js.ExecuteScript("arguments[0].click();", IChargesSearch); Thread.Sleep(3000); break; } } catch { } } } gc.CreatePdf(orderNumber, parcelNumber, "Ownership", driver, "VA", "Chesterfield"); IWebElement Ownershiptable = driver.FindElement(By.XPath("//*[@id='tab_Ownership']/div/div[2]/div/div[1]/div/table/tbody")); IList <IWebElement> Ownershiprow = Ownershiptable.FindElements(By.TagName("tr")); IList <IWebElement> Ownershipid; foreach (IWebElement Ownership in Ownershiprow) { Ownershipid = Ownership.FindElements(By.TagName("td")); if (Ownershipid.Count > 1) { string Ownershipresult = Ownershipid[1].Text + "~" + Ownershipid[2].Text + "~" + Ownershipid[3].Text + "~" + Ownershipid[4].Text + "~" + Ownershipid[5].Text + "~" + Ownershipid[6].Text + "~" + Ownershipid[7].Text + "~" + Ownershipid[8].Text + "~" + Ownershipid[9].Text + "~" + Ownershipid[10].Text; gc.insert_date(orderNumber, Parcel_number, 2153, Ownershipresult, 1, DateTime.Now); } } //Tax Site TaxTime = DateTime.Now.ToString("HH:mm:ss"); IWebElement Assessmentslink5 = driver.FindElement(By.XPath("//*[@id='read-content']/div[4]/div/div/div[1]/div/div/div")); IList <IWebElement> IChargesRow5 = Assessmentslink5.FindElements(By.TagName("div")); IList <IWebElement> IChargesTD5; foreach (IWebElement charge5 in IChargesRow5) { IChargesTD5 = charge5.FindElements(By.TagName("a")); if (IChargesTD5.Count != 0) { try { string strcharges = IChargesTD5[0].GetAttribute("innerText"); if (strcharges.Contains("TAX")) { IWebElement IChargesSearch = IChargesTD5[0]; js.ExecuteScript("arguments[0].click();", IChargesSearch); Thread.Sleep(3000); break; } } catch { } } } gc.CreatePdf(orderNumber, parcelNumber, "TaxHistory", driver, "VA", "Chesterfield"); string taxAccount = driver.FindElement(By.Id("taxAccount")).Text; string Currentbalance1 = driver.FindElement(By.XPath("//*[@id='tab_Tax']/div/div[2]/div/ul/li[2]/div/div/div/ul/li/div[1]")).Text; string currentbalncedate = GlobalClass.After(Currentbalance1, "as of"); string currentbalanceamt = driver.FindElement(By.XPath("//*[@id='tab_Tax']/div/div[2]/div/ul/li[2]/div/div/div/ul/li/div[2]")).Text; IWebElement TaxAssessmenttable = driver.FindElement(By.XPath("//*[@id='tab_Tax']/div/div[2]/div/ul/li[3]/div[2]/div/div/table/tbody")); IList <IWebElement> TaxAssessmentrow = TaxAssessmenttable.FindElements(By.TagName("tr")); IList <IWebElement> TaxAssessmentid; foreach (IWebElement TaxAssessment in TaxAssessmentrow) { TaxAssessmentid = TaxAssessment.FindElements(By.TagName("td")); if (TaxAssessmentid.Count != 0) { string TaxAssessmentresult = taxAccount + "~" + currentbalncedate + "~" + currentbalanceamt + "~" + TaxAssessmentid[0].Text + "~" + TaxAssessmentid[1].Text + "~" + TaxAssessmentid[2].Text + "~" + TaxAssessmentid[3].Text; gc.insert_date(orderNumber, Parcel_number, 2144, TaxAssessmentresult, 1, DateTime.Now); } } driver.FindElement(By.XPath("//*[@id='tab_Tax']/div/div[2]/div/ul/li[6]/div/div[1]/div[1]")).Click(); Thread.Sleep(6000); IList <IWebElement> Licount = driver.FindElement(By.XPath("//*[@id='tab_Tax']/div/div[2]/div/ul/li[6]/div/div[2]/div/ul")).FindElements(By.TagName("li")); try { for (int I = 1; I <= 6; I++) { //*[@id="tab_Tax"]/div/div[2]/div/ul/li[6]/div/div[2]/div/ul/li[1] IWebElement Halfclick = driver.FindElement(By.XPath("//*[@id='tab_Tax']/div/div[2]/div/ul/li[6]/div/div[2]/div/ul/li[" + I + "]")); Halfclick.SendKeys(Keys.Enter); //js.ExecuteScript("arguments[0].click();", Halfclick); Thread.Sleep(4000); string Taxyear1 = driver.FindElement(By.XPath("//*[@id='tab_Tax']/div/div[2]/div/ul/li[6]/div/div[2]/div/ul/li[" + I + "]/div[1]")).Text; string taxyear = GlobalClass.Before(Taxyear1, ":"); gc.CreatePdf(orderNumber, parcelNumber, "TaxHistory" + I, driver, "VA", "Chesterfield"); IWebElement TaxaccountHistorytable = driver.FindElement(By.XPath("//*[@id='tab_Tax']/div/div[2]/div/ul/li[6]/div/div[2]/div/ul/li[" + I + "]/div[2]/div/div/div/table/tbody")); IList <IWebElement> TaxaccountHistoryrow = TaxaccountHistorytable.FindElements(By.TagName("tr")); IList <IWebElement> TaxaccountHistoryid; foreach (IWebElement TaxaccountHistory in TaxaccountHistoryrow) { TaxaccountHistoryid = TaxaccountHistory.FindElements(By.TagName("td")); if (TaxaccountHistoryid.Count != 0) { string TaxaccountHistoryresult = taxyear + "~" + TaxaccountHistoryid[0].Text + "~" + TaxaccountHistoryid[1].Text + "~" + TaxaccountHistoryid[2].Text + "~" + TaxaccountHistoryid[3].Text + "~" + TaxaccountHistoryid[4].Text + "~" + TaxaccountHistoryid[5].Text + "~" + TaxaccountHistoryid[6].Text; gc.insert_date(orderNumber, Parcel_number, 2145, TaxaccountHistoryresult, 1, DateTime.Now); } } } } catch { } LastEndTime = DateTime.Now.ToString("HH:mm:ss"); gc.insert_TakenTime(orderNumber, "VA", "Chesterfield", StartTime, AssessmentTime, TaxTime, CitytaxTime, LastEndTime); driver.Quit(); //HttpContext.Current.Session["titleparcel"] = null; gc.mergpdf(orderNumber, "VA", "Chesterfield"); return("Data Inserted Successfully"); } catch (Exception ex) { driver.Quit(); GlobalClass.LogError(ex, orderNumber); throw ex; } } }
public string AdamsCO(string Streetno, string sname, string direction, string streettype, string unitnumber, string parcelNumber, string ownername, string searchType, string orderNumber, string directParcel) { GlobalClass.global_orderNo = orderNumber; HttpContext.Current.Session["orderNo"] = orderNumber; GlobalClass.global_parcelNo = parcelNumber; List <string> taxinformation = new List <string>(); string StartTime = "", AssessmentTime = "", TaxTime = "", CitytaxTime = "", LastEndTime = ""; string As_of = "", Total_Due = "", MillLevy = "", Class = "", Built = ""; string Parcel_number = "", Tax_Authority = "", yearbuild = "", AddressCombain = "", Addresshrf = "", TaxesDue = "", Multiaddressadd = "", MailingAddress = ""; var driverService = PhantomJSDriverService.CreateDefaultService(); driverService.HideCommandPromptWindow = true; //driver = new PhantomJSDriver(); //driver = new ChromeDriver() using (driver = new PhantomJSDriver()) { try { if (searchType == "titleflex") { string Address = ""; if (direction != "") { Address = Streetno.Trim() + " " + direction.ToUpper().Trim() + " " + sname.ToUpper().Trim() + " " + streettype.ToUpper().Trim(); } if (Streetno != "") { Address = Streetno + " " + sname + " " + streettype + " " + unitnumber; } gc.TitleFlexSearch(orderNumber, "", ownername, Address, "CO", "Adams"); if ((HttpContext.Current.Session["TitleFlex_Search"] != null)) { driver.Quit(); return("MultiParcel"); } else if (HttpContext.Current.Session["titleparcel"].ToString() == "") { HttpContext.Current.Session["Adams_Zero"] = "Zero"; driver.Quit(); return("No Data Found"); } searchType = "parcel"; parcelNumber = HttpContext.Current.Session["titleparcel"].ToString().Replace(".", ""); } driver.Navigate().GoToUrl("http://gisapp.adcogov.org/quicksearch/"); if (searchType == "address") { driver.FindElement(By.Id("ctl00_ContentPlaceHolder_SearchOptions_2")).Click(); Thread.Sleep(1000); driver.FindElement(By.Id("ctl00_ContentPlaceHolder_SearchInput")).SendKeys(Streetno); gc.CreatePdf_WOP(orderNumber, "Address search", driver, "CO", "Adams"); driver.FindElement(By.Id("ctl00_ContentPlaceHolder_SearchSubmitLink")).Click(); Thread.Sleep(2000); if (direction.Trim() != "") { AddressCombain = Streetno + " " + direction + " " + sname + " " + streettype; } else { AddressCombain = Streetno + " " + sname + " " + streettype.Trim(); } int Max = 0; IWebElement Addresstable = driver.FindElement(By.XPath("//*[@id='ctl00_ContentPlaceHolder_QuickSearchResultsDisplay']/tbody")); IList <IWebElement> Addresrow = Addresstable.FindElements(By.TagName("tr")); IList <IWebElement> AddressTD; gc.CreatePdf_WOP(orderNumber, "Address After", driver, "CO", "Adams"); foreach (IWebElement AddressT in Addresrow) { AddressTD = AddressT.FindElements(By.TagName("td")); if (AddressTD.Count != 0 && AddressTD[2].Text.Contains(AddressCombain.ToUpper())) { IWebElement Parcellink = AddressTD[0].FindElement(By.TagName("a")); Addresshrf = Parcellink.GetAttribute("href"); string parcelno = AddressTD[0].Text; string OwnerName = AddressTD[1].Text; string Address = AddressTD[2].Text; string Multiresult = OwnerName + "~" + Address; gc.insert_date(orderNumber, parcelno, 1851, Multiresult, 1, DateTime.Now); Max++; } } if (Max == 1) { driver.Navigate().GoToUrl(Addresshrf); Thread.Sleep(2000); } if (Max > 1 && Max < 26) { HttpContext.Current.Session["multiParcel_Adams"] = "Yes"; driver.Quit(); return("MultiParcel"); } if (Max > 25) { HttpContext.Current.Session["multiParcel_Adams_Multicount"] = "Maximum"; driver.Quit(); return("Maximum"); } if (Max == 0) { HttpContext.Current.Session["Adams_Zero"] = "Zero"; driver.Quit(); return("No Data Found"); } } if (searchType == "parcel") { string Parcel = parcelNumber.Substring(0, 1); if (Convert.ToInt16(Parcel) == 0) { driver.FindElement(By.Id("ctl00_ContentPlaceHolder_SearchInput")).SendKeys(parcelNumber.Replace("-", "").Trim()); } if (Convert.ToInt16(Parcel) != 0) { driver.FindElement(By.Id("ctl00_ContentPlaceHolder_SearchInput")).SendKeys("0" + parcelNumber.Replace("-", "").Trim()); } driver.FindElement(By.Id("ctl00_ContentPlaceHolder_SearchSubmitLink")).Click(); Thread.Sleep(2000); try { string Nodata = driver.FindElement(By.XPath("//*[@id='ctl00_ContentPlaceHolder_QuickSearchResultsDisplay']/tbody/tr/td")).Text; if (Nodata.Contains("Sorry, there are no data")) { HttpContext.Current.Session["Adams_Zero"] = "Zero"; driver.Quit(); return("No Data Found"); } } catch { } IWebElement ParcelLink = driver.FindElement(By.XPath("//*[@id='ctl00_ContentPlaceHolder_QuickSearchResultsDisplay']/tbody/tr[2]/td[1]/a")); string Parcelhref = ParcelLink.GetAttribute("href"); driver.Navigate().GoToUrl(Parcelhref); Thread.Sleep(2000); } if (searchType == "Account") { driver.FindElement(By.Id("ctl00_ContentPlaceHolder_SearchOptions_1")).Click(); Thread.Sleep(2000); driver.FindElement(By.Id("ctl00_ContentPlaceHolder_SearchInput")).SendKeys(unitnumber); gc.CreatePdf_WOP(orderNumber, "Account search", driver, "CO", "Adams"); driver.FindElement(By.Id("ctl00_ContentPlaceHolder_SearchSubmitLink")).Click(); Thread.Sleep(20000); gc.CreatePdf_WOP(orderNumber, "Account Click", driver, "CO", "Adams"); IWebElement Accountlink = driver.FindElement(By.XPath("//*[@id='ctl00_ContentPlaceHolder_QuickSearchResultsDisplay']/tbody/tr[2]/td[1]")).FindElement(By.TagName("a")); string Accounthref = Accountlink.GetAttribute("href"); driver.Navigate().GoToUrl(Accounthref); } //*[@id="propertyReport"]/span[3]/span[1]/div/span[2] Parcel_number = driver.FindElement(By.XPath("//*[@id='propertyReport']/span[3]/span[1]/div/span[2]")).Text; string owner = driver.FindElement(By.Id("ownerNameLabel")).Text; string AddressPro = driver.FindElement(By.Id("propertyContentCell")).Text; IWebElement Expandall = driver.FindElement(By.XPath("//*[@id='propertyReport']/span[2]/span[1]/a")); Expandall.Click(); Thread.Sleep(2000); gc.CreatePdf(orderNumber, Parcel_number, "Expand All", driver, "CO", "Adams"); string Account = driver.FindElement(By.XPath("//*[@id='propertyReport']/span[6]/span[3]/div/table/tbody/tr[2]/td[1]/span")).Text; string Taxdistrist = driver.FindElement(By.XPath("//*[@id='propertyReport']/span[6]/span[3]/div/table/tbody/tr[2]/td[3]/a")).Text; string Legal = driver.FindElement(By.XPath(" //*[@id='propertyReport']/span[5]/span[3]/div/span")).Text; string Subdevision = driver.FindElement(By.XPath("//*[@id='propertyReport']/span[5]/span[6]/div/span")).Text; string MillLevyAss = driver.FindElement(By.XPath("//*[@id='propertyReport']/span[6]/span[3]/div/table/tbody/tr[2]/td[4]/span")).Text; string Permit = driver.FindElement(By.XPath("//*[@id='propertyReport']/span[8]/span[3]/div")).Text; Thread.Sleep(2000); try { yearbuild = driver.FindElement(By.XPath("//*[@id='propertyReport']/span[14]/span[2]/div/table/tbody/tr[2]/td[2]/span")).Text; } catch { } string Buildas = driver.FindElement(By.XPath("//*[@id='propertyReport']/span[14]/span[2]/div/table/tbody/tr[1]/td[2]/span")).Text; string Buildingtype = driver.FindElement(By.XPath("//*[@id='propertyReport']/span[14]/span[2]/div/table/tbody/tr[3]/td[2]/span")).Text; string Propertydetailresult = owner + "~" + AddressPro + "~" + Account + "~" + Taxdistrist + "~" + Legal + "~" + Subdevision + "~" + MillLevyAss + "~" + Buildas + "~" + Buildingtype + "~" + yearbuild + "~" + Permit; gc.insert_date(orderNumber, Parcel_number, 1613, Propertydetailresult, 1, DateTime.Now); IWebElement landvaluetable = driver.FindElement(By.XPath("//*[@id='propertyReport']/span[12]/span[3]/div/table/tbody")); IList <IWebElement> landvaluerow = landvaluetable.FindElements(By.TagName("tr")); IList <IWebElement> landvalueid; foreach (IWebElement landvalue in landvaluerow) { landvalueid = landvalue.FindElements(By.TagName("td")); if (!landvalue.Text.Contains("Land Subtotal") && !landvalue.Text.Contains("Account Number") && landvalueid[0].Text.Trim() != "") { string LandResult1 = landvalueid[0].Text + "~" + landvalueid[1].Text + "~" + landvalueid[2].Text + "~" + landvalueid[3].Text + "~" + landvalueid[4].Text + "~" + landvalueid[5].Text + "~" + landvalueid[6].Text + "~" + landvalueid[7].Text + "~" + landvalueid[8].Text; gc.insert_date(orderNumber, Parcel_number, 1628, LandResult1, 1, DateTime.Now); } if (landvalue.Text.Contains("Land Subtotal")) { string Landresult = landvalueid[0].Text + "~" + "" + "~" + "" + "~" + "" + "~" + "" + "~" + "" + "~" + "" + "~" + landvalueid[7].Text + "~" + landvalueid[8].Text; gc.insert_date(orderNumber, Parcel_number, 1628, Landresult, 1, DateTime.Now); } } IWebElement Improvementtable = driver.FindElement(By.XPath("//*[@id='propertyReport']/span[12]/span[5]/div/table/tbody")); IList <IWebElement> Improvementrow = Improvementtable.FindElements(By.TagName("tr")); IList <IWebElement> Improvementid; foreach (IWebElement Improvement in Improvementrow) { Improvementid = Improvement.FindElements(By.TagName("td")); if (Improvement.Text.Contains("Improvements Subtotal:")) { string impromentresult = Improvementid[0].Text + "~" + "" + "~" + "" + "~" + "" + "~" + "" + "~" + "" + "~" + "" + "~" + Improvementid[1].Text + "~" + Improvementid[2].Text;; gc.insert_date(orderNumber, Parcel_number, 1628, impromentresult, 1, DateTime.Now); } } IWebElement TotalPropertytable = driver.FindElement(By.XPath("//*[@id='propertyReport']/span[12]/span[7]/table/tbody")); IList <IWebElement> TotalPropertyrow = TotalPropertytable.FindElements(By.TagName("tr")); IList <IWebElement> TotalPropertytid; foreach (IWebElement TotalProperty in TotalPropertyrow) { TotalPropertytid = TotalProperty.FindElements(By.TagName("td")); if (TotalPropertytid.Count != 0) { string TotalPropertyresult = TotalPropertytid[0].Text + "~" + "" + "~" + "" + "~" + "" + "~" + "" + "~" + "" + "~" + "" + "~" + TotalPropertytid[1].Text + "~" + TotalPropertytid[2].Text; gc.insert_date(orderNumber, Parcel_number, 1628, TotalPropertyresult, 1, DateTime.Now); } } //Tax_Authority try { driver.Navigate().GoToUrl("http://www.adcogov.org/faqs/where-do-i-make-payment-0"); string Taxauthority = driver.FindElement(By.XPath("//*[@id='node-8873']/div[1]/div/div/p")).Text; Tax_Authority = gc.Between(Taxauthority, "to the", ". To"); } catch { } //Tax Site driver.Navigate().GoToUrl("https://www.adcotax.com/treasurer/web/login.jsp"); driver.FindElement(By.XPath("//*[@id='middle_left']/font/form/input[1]")).Click(); Thread.Sleep(2000); gc.CreatePdf(orderNumber, Parcel_number, "Tax Site Enter", driver, "CO", "Adams"); driver.FindElement(By.Id("TaxAParcelID")).SendKeys(Parcel_number); gc.CreatePdf(orderNumber, Parcel_number, "Tax Site Parcel", driver, "CO", "Adams"); driver.FindElement(By.XPath("//*[@id='middle']/font/form/table[3]/tbody/tr/td[1]/input")).Click(); Thread.Sleep(2000); driver.FindElement(By.XPath("//*[@id='searchResultsTable']/tbody/tr/td[1]/strong/a")).Click(); Thread.Sleep(2000); gc.CreatePdf(orderNumber, Parcel_number, "Tax Site After", driver, "CO", "Adams"); //Summary string check = "", AreaID = "", Title1 = "", ValueAmount = "", paymenttype = "", ValueTitle = "", Title2 = "", Taxes = "", TActual = "", TAssessed = ""; try { //IWebElement currenttaxtable = driver.FindElement(By.LinkText("Account Summary")); IWebElement IValue = driver.FindElement(By.XPath("//*[@id='taxAccountValueSummary']/div/table/tbody")); IList <IWebElement> IValueRow = IValue.FindElements(By.TagName("tr")); IList <IWebElement> IValueTD; foreach (IWebElement value in IValueRow) { IValueTD = value.FindElements(By.TagName("td")); if (IValueTD.Count != 0 && value.Text != "") { if (IValueTD[1].Text.Trim() == "" && IValueTD[0].Text.Trim() != "" && IValueTD[2].Text.Trim() != "" && !IValueTD[0].Text.Contains("Area Id")) { if (check != "" && check == "Area ID") { check = ""; ValueAmount += IValueTD[0].Text + "~" + IValueTD[2].Text + "~"; } else { ValueTitle += IValueTD[0].Text + "~"; ValueAmount += IValueTD[2].Text + "~"; } } if (IValueTD[1].Text.Trim() == "" && IValueTD[0].Text.Trim() != "" && IValueTD[2].Text.Trim() != "" && IValueTD[0].Text.Contains("Area Id")) { ValueTitle += IValueTD[0].Text + "~" + IValueTD[2].Text + "~"; check = "Area ID"; } if (IValueTD[0].Text.Trim() == "" && IValueTD[1].Text.Trim() != "" && IValueTD[2].Text.Trim() != "") { Title1 = IValueTD[1].Text; Title2 = IValueTD[2].Text; } if (IValueTD[0].Text.Trim() != "" && IValueTD[1].Text.Trim() != "" && IValueTD[2].Text.Trim() != "") { ValueTitle += IValueTD[0].Text + "(" + Title1 + ")" + "~" + IValueTD[0].Text + "(" + Title2 + ")" + "~"; ValueAmount += IValueTD[1].Text + "~" + IValueTD[2].Text + "~"; } } } db.ExecuteQuery("update data_field_master set Data_Fields_Text='" + ValueTitle.Remove(ValueTitle.Length - 1, 1) + "' where Id = '" + 1634 + "'"); gc.insert_date(orderNumber, Parcel_number, 1634, ValueAmount.Remove(ValueAmount.Length - 1, 1), 1, DateTime.Now); } catch { } int z = 0; //*[@id="totals"]/table/tbody //*[@id="totals"]/table/tbody try { for (int i = 1; i < 3; i++) { IWebElement Inquirytable = driver.FindElement(By.Id("totals")); if (Inquirytable.Text.Contains("Misc Due") || Inquirytable.Text.Contains("Interest Due")) { break; } IWebElement As_off = driver.FindElement(By.Id("paymentDate")); As_of = As_off.GetAttribute("value"); if (i == 1) { paymenttype = driver.FindElement(By.XPath("//*[@id='inquiryForm']/table/tbody/tr[2]/td[2]/label[1]")).Text; driver.FindElement(By.Id("paymentTypeFirst")).Click(); Thread.Sleep(3000); gc.CreatePdf(orderNumber, Parcel_number, "first Due", driver, "CO", "Adams"); } else { paymenttype = driver.FindElement(By.XPath("//*[@id='inquiryForm']/table/tbody/tr[2]/td[2]/label[2]")).Text; //if (paymenttype == "First") //{ // driver.FindElement(By.Id("paymentTypeFirst")).Click(); // Thread.Sleep(1000); // gc.CreatePdf(orderNumber, Parcel_number, "first", driver, "CO", "Adams"); //} if (paymenttype == "Second") { driver.FindElement(By.Id("paymentTypeSecond")).Click(); Thread.Sleep(3000); gc.CreatePdf(orderNumber, Parcel_number, "second Due", driver, "CO", "Adams"); } } Total_Due = GlobalClass.After(Inquirytable.Text, "Total Due").Trim(); if (Inquirytable.Text.Contains("Taxes Due")) { TaxesDue = gc.Between(Inquirytable.Text, "Taxes Due", "Total Due").Trim(); } string cuttenttaxresult1 = As_of + "~" + paymenttype + "~" + TaxesDue + "~" + Total_Due; gc.insert_date(orderNumber, Parcel_number, 1635, cuttenttaxresult1, 1, DateTime.Now); z++; } } catch { } if (z > 1) { for (int i = 1; i < 3; i++) { string strEffectiveDate = ""; string currDate = DateTime.Now.ToString("MM/dd/yyyy"); string dateChecking = DateTime.Now.ToString("MM") + "/15/" + DateTime.Now.ToString("yyyy"); if (i == 1) { if (Convert.ToDateTime(currDate) > Convert.ToDateTime(dateChecking)) { string nextEndOfMonth = ""; if ((Convert.ToInt16(Convert.ToInt16(DateTime.Now.ToString("MM"))) < 12)) { nextEndOfMonth = new DateTime(Convert.ToInt16(DateTime.Now.ToString("yyyy")), Convert.ToInt16(Convert.ToInt16(DateTime.Now.ToString("MM")) + 1), DateTime.DaysInMonth(Convert.ToInt16(DateTime.Now.ToString("yyyy")), Convert.ToInt16(DateTime.Now.ToString("MM")) + 1)).ToString("MM/dd/yyyy"); } else { int nxtYr = Convert.ToInt16(DateTime.Now.ToString("yyyy")) + 1; nextEndOfMonth = nextEndOfMonth = new DateTime(nxtYr, 1, DateTime.DaysInMonth(Convert.ToInt16(DateTime.Now.ToString("yyyy")), 1)).ToString("MM/dd/yyyy"); } strEffectiveDate = nextEndOfMonth; } else { string EndOfMonth = new DateTime(Convert.ToInt16(DateTime.Now.ToString("yyyy")), Convert.ToInt16(Convert.ToInt16(DateTime.Now.ToString("MM"))), DateTime.DaysInMonth(Convert.ToInt16(DateTime.Now.ToString("yyyy")), Convert.ToInt16(DateTime.Now.ToString("MM")))).ToString("MM/dd/yyyy"); strEffectiveDate = EndOfMonth; } } paymenttype = driver.FindElement(By.XPath("//*[@id='inquiryForm']/table/tbody/tr[2]/td[2]/label[1]")).Text; if (i == 1) { if (paymenttype == "First") { driver.FindElement(By.Id("paymentDate")).Clear(); driver.FindElement(By.Id("paymentDate")).SendKeys(strEffectiveDate); Thread.Sleep(1000); driver.FindElement(By.Id("paymentTypeFirst")).Click(); Thread.Sleep(1000); gc.CreatePdf(orderNumber, Parcel_number, "first", driver, "CO", "Adams"); } } else { paymenttype = driver.FindElement(By.XPath("//*[@id='inquiryForm']/table/tbody/tr[2]/td[2]/label[2]")).Text; if (paymenttype == "Full") { driver.FindElement(By.Id("paymentTypeFull")).Click(); Thread.Sleep(2000); gc.CreatePdf(orderNumber, Parcel_number, "Full", driver, "CO", "Adams"); } if (paymenttype == "Second") { driver.FindElement(By.Id("paymentTypeSecond")).Click(); Thread.Sleep(2000); gc.CreatePdf(orderNumber, Parcel_number, "Second", driver, "CO", "Adams"); } } IWebElement As_off = driver.FindElement(By.Id("paymentDate")); As_of = As_off.GetAttribute("value"); string strTaxesDue = "", strInterestDue = "", strPenalty = "", strTotal = ""; IWebElement Totaltable = driver.FindElement(By.Id("totals")); IList <IWebElement> Totalrow = Totaltable.FindElements(By.TagName("tr")); IList <IWebElement> totalth; foreach (IWebElement Total in Totalrow) { totalth = Total.FindElements(By.TagName("td")); if (totalth.Count != 0 && Total.Text.Contains("Taxes Due")) { strTaxesDue = totalth[1].Text; } if (totalth.Count != 0 && Total.Text.Contains("Penalty")) { strPenalty = totalth[1].Text; } if (totalth.Count != 0 && Total.Text.Contains("Interest Due")) { strInterestDue = totalth[1].Text; } if (totalth.Count != 0 && Total.Text.Contains("Total Due")) { strTotal = totalth[1].Text; } } db.ExecuteQuery("update data_field_master set Data_Fields_Text='" + "Payment Type~Taxes Due~Interest Due~Total Due~As of" + "' where Id = '" + 1640 + "'"); string Totalresult = paymenttype + "~" + strTaxesDue + "~" + strInterestDue + "~" + strTotal + "~" + As_of; gc.insert_date(orderNumber, Parcel_number, 1640, Totalresult, 1, DateTime.Now); } } driver.FindElement(By.LinkText("Transaction Detail")).Click(); Thread.Sleep(2000); IWebElement Transationtable = driver.FindElement(By.XPath("//*[@id='middle']/table[2]/tbody")); IList <IWebElement> Transationrow = Transationtable.FindElements(By.TagName("tr")); IList <IWebElement> Transationid; foreach (IWebElement Transation in Transationrow) { Transationid = Transation.FindElements(By.TagName("td")); if (Transationid.Count != 0 && !Transation.Text.Contains("Tax Year")) { string impromentresult = Transationid[0].Text + "~" + Transationid[1].Text + "~" + Transationid[2].Text + "~" + Transationid[3].Text + "~" + Transationid[4].Text; gc.insert_date(orderNumber, Parcel_number, 1636, impromentresult, 1, DateTime.Now); } } gc.CreatePdf(orderNumber, Parcel_number, "Transaction Detail", driver, "CO", "Adams"); IWebElement summaryTransationtable = driver.FindElement(By.XPath("//*[@id='middle']/table[1]/tbody")); IList <IWebElement> summaryTransationrow = summaryTransationtable.FindElements(By.TagName("tr")); IList <IWebElement> summaryTransationid; foreach (IWebElement summaryTransation in summaryTransationrow) { summaryTransationid = summaryTransation.FindElements(By.TagName("td")); if (summaryTransationid.Count != 0 & !summaryTransation.Text.Contains("Tax Year")) { string impromentsummaryTransationresult = summaryTransationid[0].Text + "~" + summaryTransationid[1].Text + "~" + summaryTransationid[2].Text + "~" + summaryTransationid[3].Text + "~" + summaryTransationid[4].Text + "~" + summaryTransationid[5].Text + "~" + summaryTransationid[6].Text + "~" + summaryTransationid[7].Text + "~" + Tax_Authority; gc.insert_date(orderNumber, Parcel_number, 1637, impromentsummaryTransationresult, 1, DateTime.Now); } } driver.FindElement(By.LinkText("Account Value")).Click(); Thread.Sleep(2000); IWebElement Authoritytable = driver.FindElement(By.XPath("//*[@id='middle']/table[3]/tbody")); IList <IWebElement> Authorityrow = Authoritytable.FindElements(By.TagName("tr")); IList <IWebElement> Authorityid; foreach (IWebElement Authority in Authorityrow) { Authorityid = Authority.FindElements(By.TagName("td")); if (Authorityid.Count == 4 & !Authority.Text.Contains("Authority")) { string Authorityresult = Authorityid[0].Text + "~" + Authorityid[1].Text + "~" + Authorityid[2].Text + "~" + Authorityid[3].Text; gc.insert_date(orderNumber, Parcel_number, 1638, Authorityresult, 1, DateTime.Now); } } gc.CreatePdf(orderNumber, Parcel_number, "Account Value", driver, "CO", "Adams"); string geturl = driver.Url; //Adams County Property try { IWebElement IPropertyTax = driver.FindElement(By.LinkText("Adams County Property Tax Notice")); string strPropertyTax = IPropertyTax.GetAttribute("href"); IWebElement IReedemedTax = driver.FindElement(By.LinkText("Redemption Certificate")); string strReedemedTax = IReedemedTax.GetAttribute("href"); IWebElement IAccountBalance = driver.FindElement(By.LinkText("Account Balance")); string strAccountBalance = IAccountBalance.GetAttribute("href"); IWebElement IStatementTaxDue = driver.FindElement(By.LinkText("Statement Of Taxes Due")); string strStatementTaxDue = IStatementTaxDue.GetAttribute("href"); IWebElement ISummaryTax = driver.FindElement(By.LinkText("Summary of Taxes Due")); string strSummaryTax = ISummaryTax.GetAttribute("href"); driver.Navigate().GoToUrl(strPropertyTax); Thread.Sleep(6000); try { IWebElement IPropertyTaxClick = driver.FindElement(By.LinkText("Adams County Property Tax Notice")); IPropertyTaxClick.Click(); Thread.Sleep(4000); gc.CreatePdf(orderNumber, Parcel_number, "Account Adams County Property Tax", driver, "CO", "Adams"); } catch { } driver.Navigate().GoToUrl(strReedemedTax); Thread.Sleep(6000); try { IWebElement IReedemedTaxClick = driver.FindElement(By.LinkText("Redemption Certificate")); IReedemedTaxClick.Click(); Thread.Sleep(4000); gc.CreatePdf(orderNumber, Parcel_number, "Account Redemption Certificate", driver, "CO", "Adams"); } catch { } driver.Navigate().GoToUrl(strAccountBalance); Thread.Sleep(6000); try { IWebElement IAccountTaxClick = driver.FindElement(By.LinkText("Account Balance")); IAccountTaxClick.Click(); Thread.Sleep(4000); gc.CreatePdf(orderNumber, Parcel_number, "Account Account Balance", driver, "CO", "Adams"); } catch { } driver.Navigate().GoToUrl(strStatementTaxDue); Thread.Sleep(6000); try { IWebElement IStatementTaxClick = driver.FindElement(By.LinkText("Statement Of Taxes Due")); IStatementTaxClick.Click(); Thread.Sleep(4000); gc.CreatePdf(orderNumber, Parcel_number, "Account Statement Of Taxes Due", driver, "CO", "Adams"); } catch { } driver.Navigate().GoToUrl(strSummaryTax); Thread.Sleep(6000); try { IWebElement ISummaryTaxClick = driver.FindElement(By.LinkText("Summary of Taxes Due")); ISummaryTaxClick.Click(); Thread.Sleep(4000); gc.CreatePdf(orderNumber, Parcel_number, "Account Summary of Taxes Due", driver, "CO", "Adams"); } catch { } //driver.FindElement(By.LinkText("Adams County Property Tax Notice")).Click(); //Thread.Sleep(9000); ////*[@id="myReports"]/form/table[1]/tbody //gc.CreatePdf(orderNumber, Parcel_number, "County Property Tax Notice", driver, "CO", "Adams"); ////driver.FindElement(By.XPath("//*[@id='myReports']/form/table[1]/tbody/tr[2]/td[2]/a")) //driver.FindElement(By.LinkText("Adams County Property Tax Notice")).Click(); //Thread.Sleep(5000); //gc.CreatePdf(orderNumber, Parcel_number, "Adams County Property", driver, "CO", "Adams"); //// string Adamsproperty = Countyadmslink.GetAttribute("href"); //driver.Navigate().GoToUrl(geturl); ////Redemption Certificate //driver.FindElement(By.LinkText("Redemption Certificate")).Click(); //Thread.Sleep(4000); //IWebElement RedemWeb = driver.FindElement(By.LinkText("Redemption Certificate")); //string Hrefred = RedemWeb.GetAttribute("href"); //gc.downloadfile(Hrefred, orderNumber, Parcel_number, "ViewTaxBill", "SC", "Lexington"); //Thread.Sleep(4000); //gc.CreatePdf(orderNumber, Parcel_number, "Redemption County Property", driver, "CO", "Adams"); //driver.Navigate().GoToUrl(geturl); //driver.FindElement(By.LinkText("Account Balance")).Click(); //Thread.Sleep(4000); //driver.FindElement(By.LinkText("Account Balance")).Click(); //Thread.Sleep(4000); //gc.CreatePdf(orderNumber, Parcel_number, "Account Balance", driver, "CO", "Adams"); } catch { } driver.Quit(); gc.mergpdf(orderNumber, "CO", "Adams"); return("Data Inserted Successfully"); } catch (Exception ex) { driver.Quit(); GlobalClass.LogError(ex, orderNumber); throw ex; } } }