public MainPageData() { DeparturePlace = MainPageDataReader.GetData("DeparturePlace"); ArrivalPlace = MainPageDataReader.GetData("ArrivalPlace"); LeaveDate = MainPageDataReader.GetData("LeaveDate"); ReturnDate = MainPageDataReader.GetData("ReturnDate"); }
public void BookingDayEarlierThanCurrentTest() { Logger.InitLogger(); MainPageData mainPageData = new MainPageData(MainPageDataReader.GetData("DeparturePlace"), MainPageDataReader.GetData("ArrivalPlace"), TestDate, MainPageDataReader.GetData("ReturnDate")); Driver.Navigate().GoToUrl(URL); Logger.Log.Info("Go to " + URL); MainPage page = new MainPage(Driver) .InputRouteData(mainPageData); Assert.AreNotEqual(page.leaveDateField.Text, TestDate); Logger.Log.Info("Test complete successfully"); }
public void EmptyArrivalFieldTest() { Logger.InitLogger(); MainPageData mainPageData = new MainPageData(MainPageDataReader.GetData("DeparturePlace"), string.Empty, MainPageDataReader.GetData("LeaveDate"), MainPageDataReader.GetData("ReturnDate")); Driver.Navigate().GoToUrl(URL); Logger.Log.Info("Go to " + URL); FlightSelectPage page = new MainPage(Driver) .InputRouteData(mainPageData) .ClickSearchButton(); Assert.IsTrue(Driver.FindElement(By.TagName("em")).Displayed); Logger.Log.Info("Test complete successfully"); }
public void TooManyPassengersTest() { Logger.InitLogger(); MainPageData mainPageData = new MainPageData(MainPageDataReader.GetData("DeparturePlace"), MainPageDataReader.GetData("ArrivalPlace"), MainPageDataReader.GetData("LeaveDate"), MainPageDataReader.GetData("ReturnDate")); Driver.Navigate().GoToUrl(URL); Logger.Log.Info("Go to " + URL); MainPage page = new MainPage(Driver) .InputRouteData(mainPageData) .ClickPassengerNumberListButton() .AddAdultPassenger(TestAdultPassengerNumber); Assert.IsTrue(page.addAdultPassengerButtonDisabled.Displayed); Logger.Log.Info("Test complete successfully"); }
public void FlightBookingTest() { Logger.InitLogger(); MainPageData mainPageData = new MainPageData(MainPageDataReader.GetData("DeparturePlace"), MainPageDataReader.GetData("ArrivalPlace"), MainPageDataReader.GetData("LeaveDate"), MainPageDataReader.GetData("ReturnDate")); Driver.Navigate().GoToUrl(URL); Logger.Log.Info("Go to " + URL); GuestDetailsPage page = new MainPage(Driver) .InputRouteData(mainPageData) .ClickSearchButton() .ClickContinueButton() .ClickContinueButton(); Assert.AreEqual(ExpectedHeaderText, page.header.Text); Logger.Log.Info("Test complete successfully"); }
public void IncorrectFormatOfGuestNameTest() { Logger.InitLogger(); MainPageData mainPageData = new MainPageData(MainPageDataReader.GetData("DeparturePlace"), MainPageDataReader.GetData("ArrivalPlace"), MainPageDataReader.GetData("LeaveDate"), MainPageDataReader.GetData("ReturnDate")); GuestDetailsPageData guestDetailsPageData = new GuestDetailsPageData(GuestDetailsPageDataReader.GetData("GivenName"), GuestDetailsPageDataReader.GetData("Surname"), GuestDetailsPageDataReader.GetData("Email")); Driver.Navigate().GoToUrl(URL); Logger.Log.Info("Go to " + URL); GuestDetailsPage page = new MainPage(Driver) .InputRouteData(mainPageData) .ClickSearchButton() .ClickContinueButton() .ClickContinueButton() .InputGuestData(guestDetailsPageData); Assert.AreEqual(IncorrectGuestNameError, page.incorrectNameError.Text); Logger.Log.Info("Test complete successfully"); }