public void Test001_AddWebPage() { Trace.WriteLine(BasePage.RunningTestKeyWord + "'Add a new Website Page'"); var adminPageManagementPage = new AdminPageManagementPage(_driver); adminPageManagementPage.OpenUsingButtons(_baseUrl); adminPageManagementPage.AddPage(_pageName, AdminPageManagementPage.PageType.Web, _addWebAfter); adminPageManagementPage.OpenUsingButtons(_baseUrl); Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the page: " + _pageName + "is present in the list"); Assert.IsTrue( adminPageManagementPage.ElementPresent( By.XPath(AdminPageManagementPage.PageList + "//li[div/span[text() = '" + _addWebAfter + " ']]//div/span[text() = '" + _pageName + " ']")), "The page is not present in the list"); }
public void Test006_AddHostPage() { Trace.WriteLine(BasePage.RunningTestKeyWord + "'Add a new Host Page'"); var adminPageManagementPage = new AdminPageManagementPage(_driver); adminPageManagementPage.OpenUsingButtons(_baseUrl); adminPageManagementPage.AddPage(_pageName, "Host", _addHostAfter); adminPageManagementPage.OpenUsingButtons(_baseUrl); adminPageManagementPage.RadioButtonSelect(By.XPath(AdminPageManagementPage.HostPagesRadioButton)); adminPageManagementPage.WaitForElement(By.XPath(AdminPageManagementPage.PageList + "//span[text() = 'Host ']")); Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the page: " + _pageName + "is present in the list"); Assert.IsTrue( adminPageManagementPage.ElementPresent( By.XPath(AdminPageManagementPage.PageList + "//li[div/span[text() = '" + _addHostAfter + " ']]//div/span[text() = '" + _pageName + " ']")), "The page is not present in the list"); }