Esempio n. 1
0
		public void Test0064_MoveHTMLModuleWithinContentPaneDown(string pageName)
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Move a HTML Module DOWN'");

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

			Modules module = new Modules(_driver);
			module.SetPageToEditMode(pageName);
			string moduleNumber1 = blankPage.WaitForElement(By.XPath(Modules.ContentPaneID + "/div[2]/a")).GetAttribute("name");
			string moduleNumber2 = blankPage.WaitForElement(By.XPath(Modules.ContentPaneID + "/div[3]/a")).GetAttribute("name");
			string moduleNumber3 = blankPage.WaitForElement(By.XPath(Modules.ContentPaneID + "/div[4]/a")).GetAttribute("name");
			string moduleNumber4 = blankPage.WaitForElement(By.XPath(Modules.ContentPaneID + "/div[5]/a")).GetAttribute("name");

			module.MoveModuleUsingMenu(moduleNumber2, Modules.HtmlProModuleOnPage, Modules.DownOption);

			Assert.That(blankPage.WaitForElement(By.XPath(Modules.ContentPaneID + "/div[2]/a")).GetAttribute("name"), Is.EqualTo(moduleNumber1), "Module is not found");
			Assert.That(blankPage.WaitForElement(By.XPath(Modules.ContentPaneID + "/div[3]/a")).GetAttribute("name"), Is.EqualTo(moduleNumber3), "Module is not found");
			Assert.That(blankPage.WaitForElement(By.XPath(Modules.ContentPaneID + "/div[4]/a")).GetAttribute("name"), Is.EqualTo(moduleNumber2), "Module is not found");
			Assert.That(blankPage.WaitForElement(By.XPath(Modules.ContentPaneID + "/div[5]/a")).GetAttribute("name"), Is.EqualTo(moduleNumber4), "Module is not found");
		}
Esempio n. 2
0
		public void Test005_MoveModuleToLeftPane(string pageName, string moduleNameOnPage, string newLocation, string newLocationID)
		{
			Modules module = new Modules(_driver);

			var fiModuleNameOnPage = module.GetType().GetField(moduleNameOnPage);
			moduleNameOnPage = (string)fiModuleNameOnPage.GetValue(null);

			var fiLocation = module.GetType().GetField(newLocation);
			newLocation = (string)fiLocation.GetValue(null);

			var fiNewLocationID = module.GetType().GetField(newLocationID);
			newLocationID = (string)fiNewLocationID.GetValue(null);

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

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

			blankPage.SetPageToEditMode(pageName);
			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: " + newLocationID + moduleNameOnPage);
			Assert.IsTrue(blankPage.ElementPresent(By.XPath(newLocationID + moduleNameOnPage)), "Module is not found");
		}