Beispiel #1
0
		public void Test003_RemoveDeletedUser()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Remove the 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.RemoveDeletedUser(_userName);

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

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