예제 #1
0
		public void MoveHTMLModuleWithinContentPaneDown(string moduleIdOnPage, string pageName)
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Move a HTML Module DOWN'");

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

			string contentPaneOnPage = Modules.LocationDescription["ContentPane"].IdWhenOnPage;

			var module = new Modules(_driver);
			module.SetPageToEditMode();
			string moduleNumber1 = blankPage.WaitForElement(By.XPath(contentPaneOnPage + "/div[contains(@class, 'DnnModule')][1]/a")).GetAttribute("name");
			string moduleNumber2 = blankPage.WaitForElement(By.XPath(contentPaneOnPage + "/div[contains(@class, 'DnnModule')][2]/a")).GetAttribute("name");
			string moduleNumber3 = blankPage.WaitForElement(By.XPath(contentPaneOnPage + "/div[contains(@class, 'DnnModule')][3]/a")).GetAttribute("name");
			string moduleNumber4 = blankPage.WaitForElement(By.XPath(contentPaneOnPage + "/div[contains(@class, 'DnnModule')][4]/a")).GetAttribute("name");

			module.MoveModuleUsingMenu(moduleNumber2, moduleIdOnPage, "Down");

			Assert.That(blankPage.WaitForElement(By.XPath(contentPaneOnPage + "/div[contains(@class, 'DnnModule')][1]/a")).GetAttribute("name"),
						Is.EqualTo(moduleNumber1), "Module is not found");
			Assert.That(blankPage.WaitForElement(By.XPath(contentPaneOnPage + "/div[contains(@class, 'DnnModule')][2]/a")).GetAttribute("name"),
						Is.EqualTo(moduleNumber3), "Module is not found");
			Assert.That(blankPage.WaitForElement(By.XPath(contentPaneOnPage + "/div[contains(@class, 'DnnModule')][3]/a")).GetAttribute("name"),
						Is.EqualTo(moduleNumber2), "Module is not found");
			Assert.That(blankPage.WaitForElement(By.XPath(contentPaneOnPage + "/div[contains(@class, 'DnnModule')][4]/a")).GetAttribute("name"),
						Is.EqualTo(moduleNumber4), "Module is not found");
		}
예제 #2
0
		public void MoveModuleToLeftPane(Dictionary<string, Modules.ModuleIDs> modulesDescription, string pageName, string moduleName, string newLocation)
		{
			var module = new Modules(_driver);

			string moduleNameOnPage = modulesDescription[moduleName].IdWhenOnPage;
			string locationOnPage = Modules.LocationDescription[newLocation].IdWhenOnPage;

			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Move a Module'");

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

			blankPage.SetPageToEditMode();
			string moduleNumber = blankPage.WaitForElement(By.XPath(moduleNameOnPage + "/a")).GetAttribute("name");
			module.MoveModuleUsingMenu(moduleNumber, moduleNameOnPage, newLocation);

			blankPage.OpenUsingUrl(_baseUrl, pageName);
			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the Module new location: " + locationOnPage + moduleNameOnPage);
			Assert.IsTrue(blankPage.ElementPresent(By.XPath(locationOnPage + moduleNameOnPage)), "Module is not found");
		}