public void AddNewSite(string siteType, string siteAlias, string siteTitle) { var hostSiteManagementPage = new HostSiteManagementPage(_driver); hostSiteManagementPage.OpenUsingButtons(_baseUrl); int originaltemNumber = hostSiteManagementPage.FindElements(By.XPath(HostSiteManagementPage.PortalsList)).Count; if (siteType == "ChildSite") { hostSiteManagementPage.AddNewChildSite(_baseUrl, siteAlias, siteTitle, "Default Website"); } else { hostSiteManagementPage.AddNewParentSite(siteAlias + _baseUrl, siteTitle, "Default Website"); } hostSiteManagementPage.OpenUsingButtons(_baseUrl); Trace.WriteLine("ASSERT the number of elements in the list increased by 1"); Assert.That(originaltemNumber + 1, Is.EqualTo(hostSiteManagementPage.FindElements(By.XPath(HostSiteManagementPage.PortalsList)).Count), "The Site is not added correctly"); Trace.WriteLine("ASSERT the Site name is present in the list"); Assert.IsTrue(hostSiteManagementPage.ElementPresent( By.XPath("//tr/td/span[contains(@id, 'lblPortalAliases')]/a[contains(string(), '" + siteAlias + "')]")), "The Site is not added correctly"); }
public void CreateParentSiteAndPrepareSettings(string parentSiteName, string parentSiteTitle) { Trace.WriteLine(BasePage.TraceLevelComposite + "'Create Parent Site And Prepare Settings: '"); HostSiteManagementPage hostSiteMgmtPage = new HostSiteManagementPage(_driver); hostSiteMgmtPage.OpenUsingButtons(_baseUrl); hostSiteMgmtPage.AddNewParentSite(parentSiteName, parentSiteTitle, "Default Website"); LoginPage loginPage = new LoginPage(_driver); loginPage.OpenUsingUrl(parentSiteName); loginPage.DoLogin("host", "dnnhost"); DisablePopups(parentSiteName); }