Exemplo n.º 1
0
        public void afterClick(string houseno, string streetname, string stype, string orderNumber)
        {
            IWebElement IAddress;
            string      Owner = "", strMulticount = "", Address = "", MultiParcelNumber = "", strSingleAddress = "";

            try
            {
                IWebElement         IAddressmatchclick = driver.FindElement(By.XPath("//*[@id='contents']/table/tbody/tr[1]/td/table"));
                IList <IWebElement> TRmulti11          = IAddressmatchclick.FindElements(By.TagName("tr"));
                IList <IWebElement> TDmulti11;
                foreach (IWebElement row in TRmulti11)
                {
                    TDmulti11 = row.FindElements(By.TagName("td"));
                    if (TDmulti11.Count != 0 && !row.Text.Contains("Parcel ID(Account") && row.Text.Contains(houseno) && row.Text.Contains(streetname.ToUpper()) && row.Text.Contains(stype.ToUpper()))
                    {
                        IAddress         = TDmulti11[0].FindElement(By.TagName("a"));
                        strSingleAddress = IAddress.GetAttribute("href");
                        SingleAddress.Add(strSingleAddress);
                    }
                    if (TDmulti11.Count != 0 && !row.Text.Contains("Parcel ID(Account") && row.Text.Contains(houseno) && row.Text.Contains(streetname.ToUpper()) && row.Text.Contains(stype.ToUpper()))
                    {
                        MultiParcelNumber = TDmulti11[0].Text;
                        houseno           = TDmulti11[3].Text;
                        streetname        = TDmulti11[6].Text;
                        string MultyInst = houseno + "~" + streetname.ToUpper().Trim();
                        gc.insert_date(orderNumber, MultiParcelNumber, 816, MultyInst, 1, DateTime.Now);
                    }
                }
                gc.CreatePdf(orderNumber, MultiParcelNumber, "Multiparcel Result", driver, "WV", "Kanawha");
            }
            catch { }
        }