Exemplo n.º 1
0
        public void CheckForNoCheckBoxBookingForm()
        {
            TakeScreenshotOnTestFailure(() =>
            {
                var homePage = new HomePage(Driver).OpenPage();
                homePage.FillTicketsBookingForm("Sydney", "Fairfield");

                var tripsPage = new TripsPage(Driver);

                tripsPage.ticket.Click();
                tripsPage.GetTicketButton().Click();

                var tripPage = new TripPage(Driver);

                //tripPage.getCheckBox().Click();
                tripPage.getSubmitButton().Click();

                try
                {
                    Assert.IsTrue(tripPage.CheckForError());
                }
                catch (Exception e)
                {
                    Assert.Fail("Element not found.");
                    throw e;
                }
            });
        }
Exemplo n.º 2
0
        public void CheckForIncorrectDataInBookingForm()
        {
            TakeScreenshotOnTestFailure(() =>
            {
                var homePage = new HomePage(Driver).OpenPage();
                homePage.FillTicketsBookingForm("Sydney", "Sandgate");

                var tripsPage = new TripsPage(Driver);

                tripsPage.ticket.Click();
                tripsPage.GetTicketButton().Click();

                var tripPage = new TripPage(Driver);

                tripPage.getCheckBox().Click();
                tripPage.getSubmitButton().Click();

                try
                {
                    Assert.IsTrue(tripPage.CheckForError());
                }
                catch (Exception e)
                {
                    throw e;
                }
            });
        }
Exemplo n.º 3
0
        public void CheckForIncorrectDataInBookingForm()
        {
            var homePage = new HomePage(driver);

            homePage.FillTicketsBookingForm("Sydney", "Sandgate");

            var tripsPage = new TripsPage(driver);

            tripsPage.ticket.Click();
            tripsPage.GetTicketButton().Click();

            var tripPage = new TripPage(driver);

            tripPage.checkbox.Click();
            tripPage.submitButton.Click();

            try
            {
                Assert.IsTrue(tripPage.CheckForError());
            }
            catch
            {
            }
        }