예제 #1
0
        public void TicketsToAnotherStation()
        {
            mainPage = new MainPage(Driver)
                       .InputStationsAndSeacrh(RouteCreator.ArrivalBystationName())
                       .Search();

            webTable = new WebTable();
            Assert.IsTrue(webTable.CheckElementsFromDepartureAndArrival("//span[contains(@class,'opFromSection')]",
                                                                        "Manchester Piccadilly  ",
                                                                        "Birmingham Moor Street  "));
        }
예제 #2
0
        public void TicketsByPostCode()
        {
            Driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);
            mainPage = new MainPage(Driver)
                       .InputStationsAndSeacrh(RouteCreator.ArrivalByPostcode())
                       .Search();

            webTable = new WebTable();
            Assert.IsTrue(webTable.CheckElementsFromDepartureAndArrival("//span[contains(@class,'opFromSection')]",
                                                                        "London Blackfriars  ",
                                                                        "Manchester Piccadilly  "));
        }
예제 #3
0
        public void BuyingTicketWithoutSpecifyingInforamtionAboutArriveAndDepartue()
        {
            Browser.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);

            FromToStations           fromToStations           = new FromToStations(Browser).InputStations("Manchester", "London Blackfriars");
            ConfirmSelectionCriteria confirmSelectionCriteria = new ConfirmSelectionCriteria(Browser).ClickSearchButton();

            webTable = new WebTable();
            Assert.IsTrue(webTable.CheckElementsFromDepartureAndArrival("//span[contains(@class,'opFromSection')]",
                                                                        "Manchester Piccadilly",
                                                                        "London Blackfriars"));
        }
예제 #4
0
        public void TwoWayTickets()
        {
            Driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);
            mainPage = new MainPage(Driver)
                       .InputStationsAndSeacrh(RouteCreator.WithAllProperties())
                       .OpenCloseAdditionalCriterias()
                       .SwitchReturn()
                       .Search();

            webTable = new WebTable();
            Assert.IsTrue(webTable.CheckElementsFromDepartureAndArrival("//span[contains(@class,'opFromSection')]",
                                                                        "London Blackfriars  ",
                                                                        "Manchester Piccadilly  "));
        }
예제 #5
0
        public void TakeJourneyFromRecent()
        {
            Driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);
            mainPage = new MainPage(Driver)
                       .InputStationsAndSeacrh(RouteCreator.WithAllProperties())
                       .Search()
                       .BackToHome()
                       .GetRecentTrain();

            webTable = new WebTable();
            Assert.IsTrue(webTable.CheckElementsFromDepartureAndArrival("//span[contains(@class,'opFromSection')]",
                                                                        "London Blackfriars  ",
                                                                        "Manchester Piccadilly  "));
        }