public void LoginToSite()
		{
			XDocument doc = XDocument.Load(DataFileLocation);

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

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

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

			_userNameNumberOne = testSettings.Attribute("userNameNumberOne").Value;
			_userNameNumberTwo = testSettings.Attribute("userNameNumberTwo").Value;
			_userNameNumberThree = testSettings.Attribute("userNameNumberThree").Value;
			_userDisplayNameNumberOne = testSettings.Attribute("userDisplayNameNumberOne").Value;
			_userDisplayNameNumberTwo = testSettings.Attribute("userDisplayNameNumberTwo").Value;
			_userDisplayNameNumberThree = testSettings.Attribute("userDisplayNameNumberThree").Value;
			_password = testSettings.Attribute("password").Value;
			_subject = testSettings.Attribute("subject").Value;

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

			OpenMainPageAndLoginAsHost();

			var manageUsersPage = new ManageUsersPage(_driver);
			manageUsersPage.OpenUsingControlPanel(_baseUrl);
			manageUsersPage.AddNewUser(_userNameNumberOne, _userDisplayNameNumberOne, "*****@*****.**", _password);
			manageUsersPage.AddNewUser(_userNameNumberTwo, _userDisplayNameNumberTwo, "*****@*****.**", _password);
			manageUsersPage.AddNewUser(_userNameNumberThree, _userDisplayNameNumberThree, "*****@*****.**", _password);

			_logContent = LogContent();
		}
Example #2
0
		public void LoginToSite()
		{
			XDocument doc = XDocument.Load(DataFileLocation);

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

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

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

			_userNameNumberOne = testSettings.Attribute("userNameNumberOne").Value;
			_userNameNumberTwo = testSettings.Attribute("userNameNumberTwo").Value;
			_userNameNumberThree = testSettings.Attribute("userNameNumberThree").Value;
			_userDisplayNameNumberOne = testSettings.Attribute("userDisplayNameNumberOne").Value;
			_userDisplayNameNumberTwo = testSettings.Attribute("userDisplayNameNumberTwo").Value;
			_userDisplayNameNumberThree = testSettings.Attribute("userDisplayNameNumberThree").Value;
			_password = testSettings.Attribute("password").Value;
			_subject = testSettings.Attribute("subject").Value;
			_comment = testSettings.Attribute("comment").Value;
			_fileNameToAttach = testSettings.Attribute("fileNameToAttach").Value;
			_pictureNameToAttach = testSettings.Attribute("pictureNameToAttach").Value;
			_pageName = testSettings.Attribute("pageName").Value;

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

			OpenMainPageAndLoginAsHost();

			var manageUsersPage = new ManageUsersPage(_driver);
			manageUsersPage.OpenUsingControlPanel(_baseUrl);
			manageUsersPage.AddNewUser(_userNameNumberOne, _userDisplayNameNumberOne, "*****@*****.**", _password);
			manageUsersPage.AddNewUser(_userNameNumberTwo, _userDisplayNameNumberTwo, "*****@*****.**", _password);
			manageUsersPage.AddNewUser(_userNameNumberThree, _userDisplayNameNumberThree, "*****@*****.**", _password);

			CreatePageAndSetViewPermission(_pageName, "All Users", "allow");

			AddModule(_pageName, Modules.CommonModulesDescription, "JournalModule", "ContentPane");

			var loginPage = new LoginPage(_driver);
			loginPage.LoginUsingDirectUrl(_baseUrl, _userNameNumberTwo, _password);

			var userAccountPage = new UserAccountPage(_driver);
			userAccountPage.OpenActivityFeedLink(_baseUrl);

			var module = new JournalModule(_driver);
			module.AddNewPostWithVisibilityPermission(_subject + " Community Members", "Community Members");
			module.AddNewPostWithVisibilityPermission(_subject + " Private", "Private");
			module.AddNewPostWithVisibilityPermission(_subject + " Everyone", "Everyone");

			OpenMainPageAndLoginAsHost();

			_logContent = LogContent(); 
		}
Example #3
0
		public void LoginToSite()
		{
			XDocument doc = XDocument.Load(DataFileLocation);

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

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

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

			_registeredUserName = testSettings.Attribute("registeredUserName").Value;
			_registeredUserPassword = testSettings.Attribute("registeredUserPassword").Value;
			_registeredUserDisplayName = testSettings.Attribute("registeredUserDisplayName").Value;
			_newPassword = testSettings.Attribute("newPassword").Value;
			_avatarFileToUpload = testSettings.Attribute("avatarFileToUpload").Value;

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

			OpenMainPageAndLoginAsHost();

			var manageUsersPage = new ManageUsersPage(_driver);
			manageUsersPage.OpenUsingControlPanel(_baseUrl);
			manageUsersPage.AddNewUser(_registeredUserName, _registeredUserDisplayName, "*****@*****.**", _registeredUserPassword);

			_logContent = LogContent();
		}
Example #4
0
		public void LoginToSite()
		{
			XDocument doc = XDocument.Load(DataFileLocation);

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

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

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

			_roleName = testSettings.Attribute("roleName").Value;
			_roleDescription = testSettings.Attribute("roleDescription").Value;

			_assignedRoleName = testSettings.Attribute("assignedRoleName").Value;
			_userName = testSettings.Attribute("userName").Value;
			_userDisplayName = testSettings.Attribute("userDisplayName").Value;

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

			OpenMainPageAndLoginAsHost();

			_logContent = LogContent();

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

			var manageUsersPage = new ManageUsersPage(_driver);
			manageUsersPage.OpenUsingControlPanel(_baseUrl);
			manageUsersPage.AddNewUser(_userName, _userDisplayName, "*****@*****.**", "pAssword10");
		}
		public void LoginToSite()
		{
			XDocument doc = XDocument.Load(DataFileLocation);

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

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

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

			_userNameNumberOne = testSettings.Attribute("userNameNumberOne").Value;
			_userNameNumberTwo = testSettings.Attribute("userNameNumberTwo").Value;
			_userNameNumberThree = testSettings.Attribute("userNameNumberThree").Value;
			_userDisplayNameNumberOne = testSettings.Attribute("userDisplayNameNumberOne").Value;
			_userDisplayNameNumberTwo = testSettings.Attribute("userDisplayNameNumberTwo").Value;
			_userDisplayNameNumberThree = testSettings.Attribute("userDisplayNameNumberThree").Value;
			_password = testSettings.Attribute("password").Value;
			_pageName = testSettings.Attribute("pageName").Value;

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

			OpenMainPageAndLoginAsHost();

			var manageUsersPage = new ManageUsersPage(_driver);
			manageUsersPage.OpenUsingControlPanel(_baseUrl);
			manageUsersPage.AddNewUser(_userNameNumberOne, _userDisplayNameNumberOne, "*****@*****.**", _password);
			manageUsersPage.AddNewUser(_userNameNumberTwo, _userDisplayNameNumberTwo, "*****@*****.**", _password);
			manageUsersPage.AddNewUser(_userNameNumberThree, _userDisplayNameNumberThree, "*****@*****.**", _password);

			CreatePageAndSetViewPermission(_pageName, "All Users", "allow");

			AddModule(_pageName, Modules.CommonModulesDescription, "MemberDirectoryModule", "ContentPane");

			_logContent = LogContent();
		}
Example #6
0
		public void CreateAdminAndLoginAsAdmin(string userName, string displayName, string email, string password)
		{
			ManageUsersPage manageUsersPage = new ManageUsersPage(_driver);
			manageUsersPage.OpenUsingControlPanel(_baseUrl);
			manageUsersPage.AddNewUser(userName, displayName, email, password);
			manageUsersPage.ManageRoles(userName);
			manageUsersPage.AssignRoleToUser("Administrators");

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

			LoginPage loginPage = new LoginPage(_driver);
			loginPage.LoginUsingLoginLink(userName, password);
		}
Example #7
0
		public void Test001_AddUser()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Add a new User'");

			var manageUsersPage = new ManageUsersPage(_driver);

			manageUsersPage.OpenUsingControlPanel(_baseUrl);
			manageUsersPage.WaitForElement(By.XPath(ManageUsersPage.UsersTable));
			int itemNumber = manageUsersPage.FindElements(By.XPath(ManageUsersPage.UsersList)).Count;

			manageUsersPage.AddNewUser(_userName, _userDisplayName, "*****@*****.**", "wordPass30");

			manageUsersPage.WaitForElement(By.XPath(ManageUsersPage.UsersTable));
			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the number of elements in the list increased by 1");
			Assert.That(manageUsersPage.FindElements(By.XPath(ManageUsersPage.UsersList)).Count, Is.EqualTo(itemNumber + 1),
			            "The User is not added correctly");

			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the User is present in the list");
			Assert.IsTrue(manageUsersPage.ElementPresent(By.XPath("//tr/td[text() = '" + _userName + "']")),
			              "The User is not added correctly");
		}