Exemplo n.º 1
0
        public void ThenOnTheCheckoutPageBookingSummaryDisplaysCorrectInformation()
        {
            CheckoutPage checkout = new CheckoutPage(driver);

            DateTime departDateTimeCheckout  = BasicHelper.ConvertToDateTime(checkout.DepartArrivalCheckout[0].Text);
            DateTime arrivalDateTimeCheckout = BasicHelper.ConvertToDateTime(checkout.DepartArrivalCheckout[1].Text);

            Assert.AreEqual(ScenarioContext.Current[DepartSearchPage], departDateTimeCheckout, "Departure Date / Time are different on Search and Checkout page");
            Assert.AreEqual(ScenarioContext.Current[ArrivalSearchPage], arrivalDateTimeCheckout, "Arrival Date / Time are different on Search and Checkout page");
        }
Exemplo n.º 2
0
        public void WhenUserSeesOnASearchResultPageDepartureAndArrivalTimes()
        {
            SearchPage search = new SearchPage(driver);
            //first on page departure time
            string DepartTimeStr = search.DepartTime.Text;
            //first on page arrival time
            string ArrivalTimeStr = search.ArrivalTime.Text;
            //first on page departure date
            string DepartDateStr = search.DepartDate.Text;
            //first on page arrival date
            string ArrivalDateStr = search.ArrivalDate.Text;

            string departDateTimeOnSearchPage  = DepartDateStr + " " + DepartTimeStr;
            string arrivalDateTimeOnSearchPage = ArrivalDateStr + " " + ArrivalTimeStr;

            DateTime departOnSearchPageDateTime  = BasicHelper.ConvertToDateTime(departDateTimeOnSearchPage);
            DateTime arrivalOnSearchPageDateTime = BasicHelper.ConvertToDateTime(arrivalDateTimeOnSearchPage);

            ScenarioContext.Current.Add(DepartSearchPage, departOnSearchPageDateTime);
            ScenarioContext.Current.Add(ArrivalSearchPage, arrivalOnSearchPageDateTime);
        }