public void Can_Create_Students() { string format = @"yyyy-MM-dd"; var FirstName = "John"; var date = DateTime.Now; var StudsToCreate = 5; for (int i = 0; i < StudsToCreate; i++) { var name = "Stud" + i; NewStudentPage.CreateStudent(name, FirstName, date); Assert.IsTrue(NewStudentPage.DoesElementExistWithData(name + ' ' + FirstName + ' ' + date.ToString(format))); } }
public void Can_Edit_Student() { string format = @"yyyy-MM-dd"; var name = "EditedStud"; var FirstName = "Ivan"; var date = DateTime.Now; NewStudentPage.GoTo(); NewStudentPage.CreateStudent("TestStud", "John", date); EditStudentPage.GoTo(); EditStudentPage.EditStudent(name) .WithFirstName(FirstName) .WithStartDate(date) .Create(); Assert.IsTrue(NewStudentPage.DoesElementExistWithData(name + ' ' + FirstName + ' ' + date.ToString(format))); }