public void Test007_AddHostMultiplePages() { Trace.WriteLine(BasePage.RunningTestKeyWord + "'Add new Host Pages'"); var adminPageManagementPage = new AdminPageManagementPage(_driver); adminPageManagementPage.OpenUsingButtons(_baseUrl); adminPageManagementPage.AddPages(_pageName1, _pageName2, _pageName3, _pageName4, AdminPageManagementPage.PageType.Host, _addHostAfter); adminPageManagementPage.OpenUsingButtons(_baseUrl); adminPageManagementPage.RadioButtonSelect(By.XPath(AdminPageManagementPage.HostPagesRadioButton)); adminPageManagementPage.WaitForElement(By.XPath("//div[contains(@id, 'Tabs_ctlPages')]//span[text() = 'Host ']")); Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the page: " + _pageName1 + "is present in the list"); Assert.IsTrue( adminPageManagementPage.ElementPresent( By.XPath(AdminPageManagementPage.PageList + "//li[div/span[text() = '" + _addHostAfter + " ']]//div/span[text() = '" + _pageName1 + " ']")), "The page " + _pageName1 + " is not present in the list"); Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the page: " + _pageName2 + "is present in the list"); Assert.IsTrue( adminPageManagementPage.ElementPresent( By.XPath(AdminPageManagementPage.PageList + "//li[div/span[text() = '" + _addHostAfter + " ']]//div/span[text() = '" + _pageName2 + " ']")), "The page " + _pageName2 + " is not present in the list"); Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the page: " + _pageName3 + "is present in the list"); Assert.IsTrue( adminPageManagementPage.ElementPresent( By.XPath(AdminPageManagementPage.PageList + "//li[div/span[text() = '" + _pageName2 + " ']]//div/span[text() = '" + _pageName3 + " ']")), "The page " + _pageName3 + " is not present in the list"); Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the page: " + _pageName4 + "is present in the list"); Assert.IsTrue( adminPageManagementPage.ElementPresent( By.XPath(AdminPageManagementPage.PageList + "//li[div/span[text() = '" + _pageName2 + " ']]//div/span[text() = '" + _pageName4 + " ']")), "The page " + _pageName4 + " 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"); }