public void student_create_should_redirect_to_index_if_created() { var student = _fixture.Create <Student>(); CreateStudentPage.GoTo(); CreateStudentPage.CreateStudent(student); CreateStudentPage.ConfirmationPageIsDisplayed.Should().BeTrue(); }
public void CreateStudent() { //1. Open the browser _browserWindow = new ChromeDriver(); _browserWindow.Navigate().GoToUrl("http://azurestudentenrollmentdemo.cloudapp.net/"); _homePage = new HomePage(_browserWindow); //2. Select Create Student on the nav bar CreateStudentPage createStudentPage = _homePage.ClickCreateStudent(); //3. Enter student details on the Create Student Page createStudentPage.FirstName.SendKeys("Steve"); createStudentPage.LastName.SendKeys("Gray"); createStudentPage.EnrolmentDate.SendKeys("01/01/2015"); //4. Click Create createStudentPage.ClickCreate(); //5. Assert the student is shown on the homepage //A future post will deal with this not being a very good test Assert.That(_homePage.GetStudentRow(1).Text, Is.EqualTo("Gray Steve 1/1/2015 Edit | Details | Delete")); }
public void CreateStudent() { //1. Open the browser BrowserWindow browserWindow = BrowserWindow.Launch(UrlUnderTest); HomePage homePage = new HomePage(browserWindow); //2. Select Create Student on the nav bar CreateStudentPage createStudentPage = homePage.ClickCreateStudentLink(); //3. Enter student details on the Create Student Page createStudentPage.FirstName.Text = "Steve"; createStudentPage.LastName.Text = "Gray"; createStudentPage.EnrolmentDate.Text = "01/01/2015"; //4. Click Create homePage = createStudentPage.ClickCreate(); //5. Assert the student is shown on the homepage //A future post will deal with this not being a very good test Assert.That(homePage.GetStudentRowText(1), Is.EqualTo("Gray Steve 1/1/2015 Edit | Details | Delete ")); }