コード例 #1
0
ファイル: BVTModules.cs プロジェクト: rrsc/Dnn.Platform
		public void Test002_AddModule()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Add a new Module'");

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

			Modules module = new Modules(_driver);
			module.OpenModulePanelUsingControlPanel();

			module.AddNewModuleUsingDragAndDrop(Modules.HtmlModule, Modules.HtmlModuleOnPage, Modules.LeftPaneID);

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the Module location: " + Modules.LeftPaneID + Modules.HtmlProModuleOnPage);
			Assert.IsTrue(blankPage.ElementPresent(By.XPath(Modules.LeftPaneID + Modules.HtmlProModuleOnPage)), "Module is not found");
		}
コード例 #2
0
ファイル: P1Modules.cs プロジェクト: rrsc/Dnn.Platform
		public void Test0010_DragAngDropHTMLModulesToAllPanesOnPage(string pageName, string moduleName, string moduleNameOnPage, string locationID)
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Drag & Drop HTML Module'");

			Modules module = new Modules(_driver);

			var fiModuleName = module.GetType().GetField(moduleName);
			moduleName = (string)fiModuleName.GetValue(null);

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

			var fiLocationID = module.GetType().GetField(locationID);
			locationID = (string)fiLocationID.GetValue(null);

			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Drag And Drop a new Module'");

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

			module.OpenModulePanelUsingControlPanel();
			module.AddNewModuleUsingDragAndDrop(moduleName, moduleNameOnPage, locationID);
			string moduleNumber = blankPage.WaitForElement(By.XPath(locationID + "/div[last()]/a")).GetAttribute("name");

			blankPage.OpenUsingUrl(_baseUrl, pageName);
			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the Module location: " + locationID + moduleNameOnPage);
			Assert.IsTrue(blankPage.ElementPresent(By.XPath(locationID + moduleNameOnPage + "/a[@name='" + moduleNumber + "']")), "Module is not found");
		}