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)); }
public void Test002_EditModule() { Trace.WriteLine(BasePage.RunningTestKeyWord + "'Add content to HTML Module'"); var blankPage = new BlankPage(_driver); blankPage.OpenUsingUrl(_baseUrl, _pageName); var 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)); }