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

		}
Exemple #5
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 + "'SuperUsers BVT'");
			Trace.WriteLine(BasePage.PreconditionsKeyWord);

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

			_loginPage = new LoginPage(_driver);
			_loginPage.OpenUsingUrl(_baseUrl);
			_loginPage.DoLoginUsingUrl("host", "dnnhost");
		}
		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");

		}
Exemple #7
0
		public void Test004_RegisterUser()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Register the User'");

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

			_loginPage.LetMeOut();

			_loginPage.DoRegisterUsingRegisterLink(_registeredUserName, _registeredUserDisplayName, _registeredUserEmail, _registeredUserPassword);

			_driver.Navigate().Refresh();

			_loginPage.WaitForElement(By.XPath("//*[@id='" + LoginPage.LoginLink + "' and not(contains(@href, 'Logoff'))]"), 20).WaitTillVisible(20).Click();

			_loginPage.DoLoginUsingLoginLink("host", "dnnhost");

			ManageUsersPage manageUsersPage = new ManageUsersPage(_driver);
			manageUsersPage.OpenUsingUrl(_baseUrl);

			manageUsersPage.AuthorizeUser(_registeredUserName);

			manageUsersPage.OpenUsingControlPanel(_baseUrl);

			_loginPage.LoginUsingLoginLink(_registeredUserName, _registeredUserPassword);

			mainPage.OpenUsingUrl(_baseUrl);

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the User is present on the screen");
			Assert.That(mainPage.FindElement(By.Id(BasePage.RegisteredUserLink)).Text, Is.EqualTo(_registeredUserDisplayName),
					"The registered User is not logged in correctly");
		}