public void E2E3_DeleteEmployee() { Index indexPage = new Index(_driver, BASE_URL, _wait); indexPage.Open(); indexPage.GoToEmployees(); EmployeesList listPage = new EmployeesList(_driver, BASE_URL, _wait); IEnumerable <EmployeeDataRow> allEmployees = listPage.GetDataRows(); listPage.Loading(); int numberOfEmployees = allEmployees.Count(); Assert.Greater(numberOfEmployees, 0); EmployeeDataRow employee = allEmployees.Last(); Assert.False(string.IsNullOrEmpty(employee.EmployeeID.Text)); Assert.AreEqual("Test Employee", employee.Name.Text); Assert.AreEqual("Test Address", employee.Address.Text); Assert.AreEqual("newtest@email", employee.Email.Text); Assert.AreEqual("123-456-789new", employee.PhoneNumber.Text); listPage.DeleteEmployee(employee); listPage = new EmployeesList(_driver, BASE_URL, _wait); allEmployees = listPage.GetDataRows(); listPage.Loading(); Assert.AreEqual(numberOfEmployees - 1, allEmployees.Count()); }