示例#1
0
		public void Test013_ImportPage()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Import a Page'");

			PageImportPage pageImportPage = new PageImportPage(_driver);
			pageImportPage.OpenUsingControlPanel(_baseUrl);

			pageImportPage.ImportPage(_templateName, _importedPageName, _insertPageAfter);

			//Assert.That(pageImportPage.CurrentWindowUrl(), Is.EqualTo("http://" + _baseUrl.ToLower() + "/" + _importedPageName),
			//					"The page URL is not correct");

			AdminPageManagementPage adminPageManagementPage = new AdminPageManagementPage(_driver);
			adminPageManagementPage.OpenUsingButtons(_baseUrl);

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the page: " + _importedPageName + "is present in the list");
			Assert.IsTrue(
							adminPageManagementPage.ElementPresent(
							By.XPath("//li[div/span[text() = '" + _insertPageAfter + " ']]/following-sibling::li[div/span[text() = '" + _importedPageName + " ']]")),
							"The page is not present in the list");
		}
示例#2
0
		public void Test012_ExportPage()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Export a Page'");

			PageExportPage pageExportPage = new PageExportPage(_driver);
			pageExportPage.OpenUsingControlPanel(_baseUrl + ContactUsPage.ContactUsUrl);

			pageExportPage.ExportPage(_templateName, _templateDescription);

			PageImportPage pageImportPage = new PageImportPage(_driver);
			pageImportPage.OpenUsingControlPanel(_baseUrl);

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the Export Template is present in the Import dropdown");
			Assert.IsTrue(pageImportPage.ElementPresent(By.XPath(PageImportPage.TemplateDropDownId + "//li[text() = '" + _templateName + "']")),
						"Template Name is not present in the list for Import");
		}