Esempio n. 1
0
        public void NoArrivalSelected()
        {
            FromToStations           fromStations             = new FromToStations(Browser).InputFromStations("Vilnius");
            ConfirmSelectionCriteria confirmSelectionCriteria = new ConfirmSelectionCriteria(Browser).ClickSearchButton();
            var stationTo = Browser.FindElement(By.XPath("//input[contains(@id,'54-labeledInput')]"));

            Assert.AreEqual("rgba(229, 229, 229, 1)", stationTo.GetCssValue("border-bottom-color"));
        }
Esempio n. 2
0
        public void SameСityOfDepartureAndArrival()
        {
            FromToStations           fromToStations           = new FromToStations(Browser).InputFromToStations("Vilnius", "Vilnius");
            ConfirmSelectionCriteria confirmSelectionCriteria = new ConfirmSelectionCriteria(Browser).ClickSearchButton();

            Browser.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);
            var errorBlock = Browser.FindElement(By.XPath("//p[contains(@id,'4Ck6')]"));

            Assert.AreEqual("Nurodytai dienai jūsų paiešką atitinkančių kelionių nerasta", errorBlock.Text);
        }
        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"));
        }
        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"));
        }