public void DirectFlight() { StartPage startPage = new StartPage(); startPage.FillInForm("Минск", "Париж"); FindTicketsPage findTicketsPage = new FindTicketsPage(startPage.getDriver()); findTicketsPage.FilterFlight(); SoftAssert ticketsWithDirectFligtAssert = new SoftAssert(); foreach (IWebElement elem in ticketsDirectFlight) { ticketsWithDirectFligtAssert.IsTrue(elem.Displayed && !elem.Text.Contains("ПРЯМОЙ ПЕРЕЛЁТ")); } ticketsWithDirectFligtAssert.VerifyAll(); Browser.CloseBrowser(findTicketsPage.getDriver()); }
public void SelectAircompany() { StartPage startPage = new StartPage(); startPage.FillInForm("Минск", "Париж"); FindTicketsPage findTicketsPage = new FindTicketsPage(startPage.getDriver()); findTicketsPage.filterAirport(); SoftAssert ticketsWithLaggageAndBagsAssert = new SoftAssert(); foreach (IWebElement elem in ticketsAircompanyBelavia) { if (elem.Displayed) { var srcImageAirCompany = elem.FindElement(By.XPath("//img")).GetAttribute("src"); ticketsWithLaggageAndBagsAssert.AreEquals(srcImageAirCompany, "/images/airline/120/35/gravity=west/[email protected]"); } } ticketsWithLaggageAndBagsAssert.VerifyAll(); Browser.CloseBrowser(findTicketsPage.getDriver()); }
public void TypeBaggage() { StartPage startPage = new StartPage(); startPage.FillInForm("Минск", "Париж"); FindTicketsPage findTicketsPage = new FindTicketsPage(startPage.getDriver()); findTicketsPage.FilterBaggage(); SoftAssert ticketsWithLaggageAndBagsAssert = new SoftAssert(); foreach (IWebElement elem in ticketsWithBaggage) { if (elem.Displayed) { var luggage = elem.FindElement(By.XPath("./div[@class='bags-info__icons--baggage']/i")).GetAttribute("class"); var handbags = elem.FindElement(By.XPath("./div[@class='bags-info__icons--handbags']/i")).GetAttribute("class"); ticketsWithLaggageAndBagsAssert.isTrue(luggage.Contains("without-baggage") && handbags.Contains("unknown-handbags")); } } ticketsWithLaggageAndBagsAssert.VerifyAll(); Browser.CloseBrowser(findTicketsPage.getDriver()); }