コード例 #1
0
ファイル: P1Pages.cs プロジェクト: kp-xcess/Dnn.Platform
		public void Test009_MoveHostPage()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Move a Page'");

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

			adminPageManagementPage.MovePage(_pageName, _moveAfterHostPage, AdminPageManagementPage.PageType.Host);

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the page: " + _pageName + "is NOT present in the old location");
			Assert.IsFalse(
				adminPageManagementPage.ElementPresent(
					By.XPath(AdminPageManagementPage.PageList + "//li[div/span[text() = '" + _addHostAfter +
					         " ']]//div/span[text() = '" + _pageName + " ']")),
				"The page " + _pageName + " is present in the list after Page '" + _addHostAfter + "'");

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the page: " + _pageName + "is present in the new location");
			Assert.IsTrue(
				adminPageManagementPage.ElementPresent(
					By.XPath(AdminPageManagementPage.PageList + "//li[div/span[text() = '" + _moveAfterHostPage +
					         " ']]//div/span[text() = '" + _pageName + " ']")),
				"The page " + _pageName + " is not present in the list");
		}