Esempio n. 1
0
        public void Test004_DeletePage()
        {
            Trace.WriteLine(BasePage.RunningTestKeyWord + "'Delete a Page'");

            BlankPage blankPage = new BlankPage(_driver);

            blankPage.OpenUsingUrl(_baseUrl, _pageName);

            blankPage.DeletePage(_pageName);

            AdminPageManagementPage adminPageManagementPage = new AdminPageManagementPage(_driver);

            adminPageManagementPage.OpenUsingButtons(_baseUrl);

            Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the page: " + _pageName + "is NOT present in the list");
            Assert.IsFalse(adminPageManagementPage.ElementPresent(By.XPath("//div[contains(@id, 'Tabs_ctlPages')]//li[@class= 'rtLI']//span[contains(text(), '" + _pageName + "')]")),
                           "The page is present in the list");

            AdminRecycleBinPage adminRecycleBinPage = new AdminRecycleBinPage(_driver);

            adminRecycleBinPage.OpenUsingButtons(_baseUrl);

            Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the page: " + _pageName + "is present in Recycle Bin");
            Assert.IsTrue(adminRecycleBinPage.ElementPresent(By.XPath(AdminRecycleBinPage.RecycleBinPageContainerOption + "[contains(text(), '" + _pageName + "')]")));
        }
Esempio n. 2
0
        //[Test]
        public void Test007_RemoveModuleFromRecycleBin()
        {
            Trace.WriteLine(BasePage.RunningTestKeyWord + "'Remove the Module from Recycling Bin'");

            AdminRecycleBinPage adminRecycleBinPage = new AdminRecycleBinPage(_driver);

            adminRecycleBinPage.OpenUsingButtons(_baseUrl);

            adminRecycleBinPage.RemoveModule(_moduleTitle);

            adminRecycleBinPage.OpenUsingButtons(_baseUrl);

            Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the module: " + _moduleTitle + " is NOT present in Recycle Bin");
            Assert.IsFalse(adminRecycleBinPage.ElementPresent(By.XPath(AdminRecycleBinPage.RecycleBinModuleContainerOption + "[contains(text(), '" + _moduleTitle + "')]")));
        }