コード例 #1
0
        public void FirstCLassTickets()
        {
            Driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);
            mainPage = new MainPage(Driver)
                       .InputStationsAndSeacrh(RouteCreator.WithAllProperties())
                       .OpenCloseAdditionalCriterias()
                       .SwitchStandardClass()
                       .OpenCloseAdditionalCriterias()
                       .Search();

            webTable = new WebTable();
            Assert.IsTrue(webTable.CheckTravelClass("//a[contains(@class,'op-listened')]", " First Class Anytime"));
        }
コード例 #2
0
        public void FirstClassTickets()
        {
            wait = new WebDriverWait(Browser, TimeSpan.FromSeconds(5));
            Browser.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(30);

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

            additionalCriterias = new AdditionalCriterias(Browser).OpenAdditionalCriteriasForm();
            additionalCriterias = new AdditionalCriterias(Browser).AdditionalCriteriasChoise();
            wait.Until(condition: ExpectedConditions.ElementToBeClickable(By.Id("opPasgrRlcrd")));
            additionalCriterias = new AdditionalCriterias(Browser).CloseAdditionalCriteriasForm();

            wait.Until(condition: ExpectedConditions.ElementToBeClickable(By.XPath("//span[contains(text(),'Go')]")));
            ConfirmSelectionCriteria confirmSelectionCriteria = new ConfirmSelectionCriteria(Browser).ClickSearchButton();

            webTable = new WebTable();
            Assert.IsTrue(webTable.CheckTravelClass("//a[contains(@class,'op-listened')]", "First class"));
        }