Exemplo n.º 1
0
		public void LoginToSite()
		{
			var doc = XDocument.Load(@"P1\" + Settings.Default.P1DataFile);

			XElement settings = doc.Document.Element("Tests").Element("settings");
			XElement pageSettings = doc.Document.Element("Tests").Element("adminExtensions");

			_driver = StartBrowser(settings.Attribute("browser").Value);
			_baseUrl = settings.Attribute("baseURL").Value;

			string testName = pageSettings.Attribute("name").Value;

			_adminExtensionToEdit = pageSettings.Attribute("adminExtensionToEdit").Value;

			Trace.WriteLine(BasePage.RunningTestKeyWord + "'" + testName + "'");
			Trace.WriteLine(BasePage.PreconditionsKeyWord);

			MainPage mainPage = new MainPage(_driver);
			mainPage.OpenUsingUrl(_baseUrl);

			_loginPage = new LoginPage(_driver);
			_loginPage.OpenUsingUrl(_baseUrl);
			_loginPage.DoLoginUsingUrl("host", "dnnhost");
			
			ManageUsersPage manageUsersPage = new ManageUsersPage(_driver);
			manageUsersPage.OpenUsingControlPanel(_baseUrl);
			manageUsersPage.AddNewUser("Admin", "Admin", "*****@*****.**", "dnnadmin");
			manageUsersPage.ManageRoles("Admin");
			manageUsersPage.AssignRoleToUser("Administrators");
			
			_loginPage.LoginUsingUrl(_baseUrl, "Admin", "dnnadmin");
		}
Exemplo n.º 2
0
		public void LoginToSite()
		{
			var doc = XDocument.Load(@"P1\" + Settings.Default.P1DataFile);

			XElement settings = doc.Document.Element("Tests").Element("settings");
			XElement pageSettings = doc.Document.Element("Tests").Element("page");

			string testName = pageSettings.Attribute("name").Value;

			_driver = StartBrowser(settings.Attribute("browser").Value);
			_baseUrl = settings.Attribute("baseURL").Value;

			Trace.WriteLine(BasePage.RunningTestKeyWord + "'" + testName + "'");
			Trace.WriteLine(BasePage.PreconditionsKeyWord);

			MainPage mainPage = new MainPage(_driver);
			mainPage.OpenUsingUrl(_baseUrl);

			_loginPage = new LoginPage(_driver);
			_loginPage.OpenUsingUrl(_baseUrl);
			_loginPage.DoLoginUsingUrl("host", "dnnhost");

			HostSettingsPage hostSettingsPage = new HostSettingsPage(_driver);
			hostSettingsPage.OpenUsingButtons(_baseUrl);
			hostSettingsPage.Click(By.XPath(HostSettingsPage.BasicSettingsTab));
			_serverName = hostSettingsPage.FindElement(By.XPath(HostSettingsPage.HostName)).Text;

		}
Exemplo n.º 3
0
		public void LoginToSite()
		{
			var doc = XDocument.Load(@"BVT\" + Settings.Default.BVTDataFile);

			XElement settings = doc.Document.Element("Tests").Element("settings");

			_driver = StartBrowser(settings.Attribute("browser").Value);
			_baseUrl = settings.Attribute("baseURL").Value;

			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Security Roles BVT'");
			Trace.WriteLine(BasePage.PreconditionsKeyWord);

			MainPage mainPage = new MainPage(_driver);
			mainPage.OpenUsingUrl(_baseUrl);

			_loginPage = new LoginPage(_driver);
			_loginPage.OpenUsingUrl(_baseUrl);
			_loginPage.DoLoginUsingUrl("host", "dnnhost");

			ManageRolesPage manageRolesPage = new ManageRolesPage(_driver);
			manageRolesPage.OpenUsingControlPanel(_baseUrl);
			manageRolesPage.AddNewSecurityRole(_assignedRoleName);

			ManageUsersPage manageUsersPage = new ManageUsersPage(_driver);
			manageUsersPage.OpenUsingControlPanel(_baseUrl);
			manageUsersPage.AddNewUser(_userName, _userDisplayName, _userEmail, _userPassword);
		}
Exemplo n.º 4
0
			public void LoginToSite()
			{
				var doc = XDocument.Load(@"P1\" + Settings.Default.P1DataFile);

				XElement settings = doc.Document.Element("Tests").Element("settings");
				XElement groupSettings = doc.Document.Element("Tests").Element("securityRoleGroup");

				string testName = groupSettings.Attribute("name").Value;
				_roleGroupName = groupSettings.Attribute("roleGroupName").Value;
				_roleGroupDescription = groupSettings.Attribute("roleGroupDescription").Value;
				_roleName = groupSettings.Attribute("roleName").Value;
				_assignedRoleGroupName = groupSettings.Attribute("assignedRoleGroupName").Value;

				_driver = StartBrowser(settings.Attribute("browser").Value);
				_baseUrl = settings.Attribute("baseURL").Value;

				Trace.WriteLine(BasePage.RunningTestKeyWord + "'" + testName + "'");
				Trace.WriteLine(BasePage.PreconditionsKeyWord);

				MainPage mainPage = new MainPage(_driver);
				mainPage.OpenUsingUrl(_baseUrl);

				_loginPage = new LoginPage(_driver);
				_loginPage.OpenUsingUrl(_baseUrl);
				_loginPage.DoLoginUsingUrl("host", "dnnhost");

				ManageRolesPage manageRolesPage = new ManageRolesPage(_driver);
				manageRolesPage.OpenUsingControlPanel(_baseUrl);
				manageRolesPage.AddNewSecurityRole(_roleName);

				manageRolesPage.OpenUsingControlPanel(_baseUrl);
				manageRolesPage.AddNewSecurityRoleGroup(_assignedRoleGroupName); 
			}
Exemplo n.º 5
0
		public void LoginToSite()
		{
			var doc = XDocument.Load(@"P1\" + Settings.Default.P1DataFile);

			XElement settings = doc.Document.Element("Tests").Element("settings");
			XElement pageSettings = doc.Document.Element("Tests").Element("page");

			string testName = pageSettings.Attribute("name").Value;

			_driver = StartBrowser(settings.Attribute("browser").Value);
			_baseUrl = settings.Attribute("baseURL").Value;

			Trace.WriteLine(BasePage.RunningTestKeyWord + "'" + testName + "'");
			Trace.WriteLine(BasePage.PreconditionsKeyWord);

			MainPage mainPage = new MainPage(_driver);
			mainPage.OpenUsingUrl(_baseUrl);

			_loginPage = new LoginPage(_driver);
			_loginPage.OpenUsingUrl(_baseUrl);
			_loginPage.DoLoginUsingUrl("host", "dnnhost");

			//Preconditions for
			AdminPageManagementPage adminPageManagementPage = new AdminPageManagementPage(_driver);
			adminPageManagementPage.OpenUsingButtons(_baseUrl);
			adminPageManagementPage.AddPagesInBulk("Page", 73, "Web", "Home");

			BlankPage blankPage = new BlankPage(_driver);

			Modules module = new Modules(_driver);
			
			int pageNumber = 1;
			while (pageNumber < 74)
			{
				blankPage.OpenUsingUrl(_baseUrl, "Home/Page" + pageNumber);
				blankPage.SetPageToEditMode("Home/Page" + pageNumber);
				string moduleNumber = module.WaitForElement(By.XPath(Modules.ContentPaneID + Modules.HtmlProModuleOnPage + "/a")).GetAttribute("name");
				module.DeleteModule(moduleNumber);
				pageNumber++;
			}

			blankPage.OpenUsingUrl(_baseUrl, "Home/Page61");
			module.OpenModulePanelUsingControlPanel();
			int i = 1;
			while (i < 5)
			{
				module.AddNewModuleUsingMenu(Modules.HtmlProModule, Modules.HtmlProModuleOnPage, Modules.ContentPaneOption, Modules.ContentPaneID);
				i++;
			}
			
		}
Exemplo n.º 6
0
		public void LoginToSite()
		{
			var doc = XDocument.Load(@"P1\" + Settings.Default.P1DataFile);

			XElement settings = doc.Document.Element("Tests").Element("settings");
			XElement pageSettings = doc.Document.Element("Tests").Element("page");

			string testName = pageSettings.Attribute("name").Value;
			_pageName = pageSettings.Attribute("pageName").Value;
			_pageDescription = pageSettings.Attribute("pageDescription").Value;

			_pageName1 = pageSettings.Attribute("pageName1").Value;
			_pageName2 = pageSettings.Attribute("pageName2").Value;
			_pageName3 = pageSettings.Attribute("pageName3").Value;
			_pageName4 = pageSettings.Attribute("pageName4").Value;

			_addWebAfter = pageSettings.Attribute("addWebAfter").Value;
			_addHostAfter = pageSettings.Attribute("addHostAfter").Value;

			_moveAfterWebPage = pageSettings.Attribute("moveAfterWebPage").Value;
			_moveAfterHostPage = pageSettings.Attribute("moveAfterHostPage").Value;

			_templateName = pageSettings.Attribute("templateName").Value;
			_templateDescription = pageSettings.Attribute("templateDescription").Value;

			_importedPageName = pageSettings.Attribute("importedPageName").Value;
			_insertPageAfter = pageSettings.Attribute("insertPageAfter").Value;

			_copiedPageName = pageSettings.Attribute("copiedPageName").Value;
			_parentPageName = pageSettings.Attribute("parentPageName").Value;
			_copyFromPage = pageSettings.Attribute("copyFromPage").Value;

			_driver = StartBrowser(settings.Attribute("browser").Value);
			_baseUrl = settings.Attribute("baseURL").Value;

			Trace.WriteLine(BasePage.RunningTestKeyWord + "'" + testName + "'");
			Trace.WriteLine(BasePage.PreconditionsKeyWord);

			MainPage mainPage = new MainPage(_driver);
			mainPage.OpenUsingUrl(_baseUrl);

			_loginPage = new LoginPage(_driver);
			_loginPage.OpenUsingUrl(_baseUrl);
			_loginPage.DoLoginUsingUrl("host", "dnnhost");

		}
Exemplo n.º 7
0
		public void Login()
		{
			var doc = XDocument.Load(@"BVT\" + Settings.Default.BVTDataFile);

			XElement settings = doc.Document.Element("Tests").Element("settings");

			_driver = StartBrowser(settings.Attribute("browser").Value);
			_baseUrl = settings.Attribute("baseURL").Value;

			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Navigation'");
			Trace.WriteLine(BasePage.PreconditionsKeyWord);

			var mainPage = new MainPage(_driver);
			mainPage.OpenUsingUrl(_baseUrl);

			_loginPage = new LoginPage(_driver);
			_loginPage.OpenUsingUrl(_baseUrl);
			_loginPage.DoLoginUsingUrl("host", "dnnhost"); 
		}
Exemplo n.º 8
0
		public void LoginToSite()
		{
			var doc = XDocument.Load(@"P1\" + Settings.Default.P1DataFile);

			XElement settings = doc.Document.Element("Tests").Element("settings");
			XElement pageSettings = doc.Document.Element("Tests").Element("taxonomy");

			string testName = pageSettings.Attribute("name").Value;

			_driver = StartBrowser(settings.Attribute("browser").Value);
			_baseUrl = settings.Attribute("baseURL").Value;

			Trace.WriteLine(BasePage.RunningTestKeyWord + "'" + testName + "'");
			Trace.WriteLine(BasePage.PreconditionsKeyWord);

			MainPage mainPage = new MainPage(_driver);
			mainPage.OpenUsingUrl(_baseUrl);

			_loginPage = new LoginPage(_driver);
			_loginPage.OpenUsingUrl(_baseUrl);
			_loginPage.DoLoginUsingUrl("host", "dnnhost");
		}
Exemplo n.º 9
0
		public void LoginToSite()
		{
			var doc = XDocument.Load(@"P1\" + Settings.Default.P1DataFile);

			XElement settings = doc.Document.Element("Tests").Element("settings");
			XElement pageSettings = doc.Document.Element("Tests").Element("hostExtensions");

			_driver = StartBrowser(settings.Attribute("browser").Value);
			_baseUrl = settings.Attribute("baseURL").Value;

			string testName = pageSettings.Attribute("name").Value;

			_hostExtensionNameToInstall = pageSettings.Attribute("hostExtensionNameToInstall").Value;
			_hostFileToUpload = pageSettings.Attribute("hostFileToUpload").Value;

			_hostExtensionToEdit = pageSettings.Attribute("hostExtensionToEdit").Value;
			_newDescription = pageSettings.Attribute("newDescription").Value;

			_extensionNameToCreate = pageSettings.Attribute("extensionNameToCreate").Value;
			_friendlyExtensionNameToCreate = pageSettings.Attribute("friendlyExtensionNameToCreate").Value;

			_moduleNameToCreate = pageSettings.Attribute("moduleNameToCreate").Value;

			_adminExtensionNameToInstall = pageSettings.Attribute("adminExtensionNameToInstall").Value;
			_adminFileToUpload = pageSettings.Attribute("adminFileToUpload").Value;

			_adminExtensionToEdit = pageSettings.Attribute("adminExtensionToEdit").Value;

			Trace.WriteLine(BasePage.RunningTestKeyWord + "'" + testName + "'");
			Trace.WriteLine(BasePage.PreconditionsKeyWord);

			MainPage mainPage = new MainPage(_driver);
			mainPage.OpenUsingUrl(_baseUrl);

			_loginPage = new LoginPage(_driver);
			_loginPage.OpenUsingUrl(_baseUrl);
			_loginPage.DoLoginUsingUrl("host", "dnnhost");

		}
Exemplo n.º 10
0
		public void LoginToSite() 
		{
			var doc = XDocument.Load(@"BVT\" + Settings.Default.BVTDataFile);

			XElement settings = doc.Document.Element("Tests").Element("settings");

			_driver = StartBrowser(settings.Attribute("browser").Value);
			_baseUrl = settings.Attribute("baseURL").Value;

			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Modules BVT'");
			Trace.WriteLine(BasePage.PreconditionsKeyWord);

			MainPage mainPage = new MainPage(_driver);
			mainPage.OpenUsingUrl(_baseUrl);

			_loginPage = new LoginPage(_driver);
			_loginPage.OpenUsingUrl(_baseUrl);
			_loginPage.DoLoginUsingUrl("host", "dnnhost");

			BlankPage blankPage = new BlankPage(_driver);
			blankPage.OpenAddNewPageFrameUsingControlPanel(_baseUrl);
			blankPage.AddNewPage(_pageName);
		}
Exemplo n.º 11
0
		//[TestFixtureTearDown]
		public void DeleteData()
		{
			MainPage mainPage = new MainPage(_driver);
			mainPage.OpenUsingUrl(_baseUrl);

			_loginPage = new LoginPage(_driver);
			_loginPage.OpenUsingUrl(_baseUrl);
			_loginPage.DoLoginUsingUrl("host", "dnnhost");

			AdminPageManagementPage adminPageManagementPage = new AdminPageManagementPage(_driver);
			adminPageManagementPage.OpenUsingButtons(_baseUrl);

			int pageNumber = 1;

			while (pageNumber < 51)
			{
				adminPageManagementPage.OpenUsingButtons(_baseUrl);
				adminPageManagementPage.DeletePage("Page" + pageNumber, "Web");
	
				pageNumber++;
			}

		}
Exemplo n.º 12
0
		public void NavigationToLoginPage()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Navigation To Login Page'");

			MainPage mainPage = new MainPage(_driver);
			mainPage.OpenUsingUrl(_baseUrl);

			LoginPage loginPage = new LoginPage(_driver);
			loginPage.LetMeOut();
			loginPage.OpenUsingUrl(_baseUrl);

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT Page Title for '" + LoginPage.PageTitleLabel + "' page:");
			StringAssert.Contains(LoginPage.PageTitleLabel, loginPage.WaitForElement(By.XPath("//span[contains(@id, '" + BasePage.PageTitle + "')]")).Text,
				"The wrong page is opened or The title of " + LoginPage.PageTitleLabel + " page is changed");

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT The Search Box is present'");
			Assert.IsTrue(loginPage.ElementPresent(By.XPath(BasePage.SearchBox)),
						"The Search Box is missing.");

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT The Search Button is present'");
			Assert.IsTrue(loginPage.ElementPresent(By.XPath(BasePage.SearchButton)),
						"The Search Button is missing.");

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT Copyright notice is present'");
			Utilities.SoftAssert(() => StringAssert.Contains(BasePage.CopyrightText, loginPage.FindElement(By.Id(BasePage.CopyrightNotice)).Text,
				"Copyright notice is not present or contains wrong text message"));

			loginPage.DoLoginUsingLoginLink("host", "dnnhost");
		}
Exemplo n.º 13
0
		public void SearchResultsOnLoginPage()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Search Results On Login Page'");

			LoginPage loginPage = new LoginPage(_driver);
			loginPage.LetMeOut();
			loginPage.OpenUsingUrl(_baseUrl);

			VerifySearchResults(loginPage);
		}
Exemplo n.º 14
0
		public void SearchResultsOnMainPage()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Search Results Main Page'");

			LoginPage loginPage = new LoginPage(_driver);
			loginPage.LetMeOut();
			loginPage.OpenUsingUrl(_baseUrl);
			loginPage.DoLoginUsingLoginLink("host", "dnnhost");

			MainPage mainPage = new MainPage(_driver);
			mainPage.OpenUsingUrl(_baseUrl);
			VerifySearchResults(mainPage);
		}