public void SetAddressDetails(string AddressType, int RoadNumber, string RoadName)
        {
            WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(waitsec));
            wait.Until(ExpectedConditions.ElementIsVisible(By.CssSelector("#rta_address_detailid>div"))).Click();
            this.driver.FindElement(By.Id("rta_address_detailid_i")).Click();

            string BaseWindow = driver.CurrentWindowHandle;

            this.driver.FindElement(By.ClassName("ms-crm-InlineLookup-FooterSection-AddAnchor")).Click();

            Thread.Sleep(1000);
            driver = UICommon.SwitchToNewBrowserWithTitle(driver, BaseWindow, "Address Detail");

            ClientNewAddressDetailsPage newAddressDetailPage = new ClientNewAddressDetailsPage(driver);
            // click on title

            newAddressDetailPage.SetAddressType(AddressType);
            newAddressDetailPage.SetRoadNumber(Convert.ToString(RoadNumber));
            newAddressDetailPage.SetRoadName(RoadName);
            newAddressDetailPage.ClickPageTitle();
            newAddressDetailPage.ClickSaveAndClose();
            driver = driver.SwitchTo().Window(BaseWindow);
            this.ClickSaveAndClose();
        }
        public void CreateNewAddress(string roadno,string roadname,string locality,string roomtype = "",string roomno="",string complexunitno="")
        {
            string BaseWindow = driver.CurrentWindowHandle;
            this.ClickNewRentalPremises(BaseWindow);

            ClientNewAddressDetailsPage addressDetailPage = new ClientNewAddressDetailsPage(driver);
            addressDetailPage.SetAddressType("Australian Physical");
            addressDetailPage.SetComplexUnitNumber(complexunitno);
            addressDetailPage.SetRoomType(roomtype);
            addressDetailPage.SetRoomNumber(roomno);
            addressDetailPage.SetRoadNumber(roadno);
            addressDetailPage.SetRoadName(roadname);
            addressDetailPage.SetLocality(locality);
            addressDetailPage.ClickSaveAndClose();
            driver.SwitchTo().Window(BaseWindow);
        }