Example #1
0
		public void Test002_EditDefaultHTMLModuleOnPage()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Edit Default HTML Module on the Page'");

			var blankPage = new BlankPage(_driver);
			blankPage.OpenUsingUrl(_baseUrl, _pageName);
			blankPage.SetPageToEditMode();

			var module = new Modules(_driver);
			Trace.WriteLine(BasePage.TraceLevelElement + "Find the Module number:");
			string moduleNumber = module.WaitForElement(By.XPath(Modules.CommonModulesDescription["HtmlModule"].IdWhenOnPage + "/a")).GetAttribute("name");

			module.AddContentToHTMLModule(moduleNumber, _pageContent);

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the Module content is present on the screen");
			Assert.That(
				blankPage.FindElement(By.XPath("//div[contains(@class, 'DNN_HTML DnnModule-')]//div[contains(@id, 'lblContent')]")).
					Text, Is.EqualTo(_pageContent));
		}