Beispiel #1
0
		public void Test004_EditModule()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Add content to HTML Module'");

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

			Modules module = new Modules(_driver);
			Trace.WriteLine(BasePage.TraceLevelElement + "Find the Module number:");
			string moduleNumber = module.WaitForElement(By.XPath(Modules.LeftPaneID + Modules.HtmlModuleOnPage + "/a")).GetAttribute("name");

			module.AddContentToHTMLModule(moduleNumber, _moduleContent);

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the module Content is present on the page");
			Assert.That(_moduleContent, Is.EqualTo(module.FindElement(By.XPath("//div[contains(@class, 'DNN_HTML DnnModule-" + moduleNumber + "')]//div[contains(@id, 'lblContent')]")).Text));
		}
Beispiel #2
0
		public void Test003_EditDefaultHTMLModuleOnPage()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Edit Default HTML Module on the Page'");

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

			Modules module = new Modules(_driver);
			Trace.WriteLine(BasePage.TraceLevelElement + "Find the Module number:");
			string moduleNumber = module.WaitForElement(By.XPath(Modules.HtmlProModuleOnPage + "/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));
		}