def setBagage(self):
        logger.info("Trying to open baggage dropdown in filters")
        ElementOperations.Button(locatorType="Xpath",
                                 locator=self.BagageXpath).click()
        logger.info("Trying to click ALL baggage checkbox")
        ElementOperations.Button(locatorType="Xpath",
                                 locator=self.BagageOpenedAll).click()
        logger.info("Trying to click full baggage checkbox")
        ElementOperations.Button(locatorType="Xpath",
                                 locator=self.FullBagageXpath).click()

        logger.info("Trying to find tickets")
        tickets = ElementOperations.ManyElements(
            locatorType="Xpath", locator=self.TicketTextXpath).find()
        logger.info("Trying to find tickets with baggage")
        withBagage = ElementOperations.ManyElements(
            locatorType="Xpath", locator=self.BagageTitleTextXpath).find()
        logger.info("Trying calculate tickets")
        lenTick = len(tickets)
        logger.info("Trying to calculate tickets with baggage")
        lenBagage = len(withBagage)
        return lenTick, lenBagage
 def findTickets(self):
     logger.info("Trying to find list of tickets text")
     tickets = ElementOperations.ManyElements(
         locatorType="Xpath", locator=self.TicketTextXpath).find()
     return tickets
 def findDates(self):
     originDates = ElementOperations.ManyElements(
         locatorType="Xpath", locator=self.TicketOriginDateXpath).find()
     datesRE = TicketPageLogic.logic().onlyDay(originDates)
     return datesRE
Beispiel #4
0
 def chooseRandomDate(self):
     today = ElementOperations.OneElement(locatorType="Xpath", locator=self.CalendarDayToodayXpath).find()
     days = ElementOperations.ManyElements(locatorType="Xpath", locator=self.CalendarDayXpath).find()
     days.append(today)
     day = random.choice(days)
     return day