Exemplo n.º 1
0
		public void DragAndDropModuleToLeftPane(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 + "'Drag and drop a Module'");

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

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

			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");
		}