Beispiel #1
0
    def input_information(self):

        se.send_keys_by_xpath(
            driver,
            '//*[@id="page-content"]/section[2]/div[2]/article/div[2]/div/div[5]/form/div/div[3]/div[1]/div[2]/div/div[1]/div/div/div/input[2]',
            self.departure)
        #time.sleep(1)
        se.click_by_id(driver, self.depart_id)

        se.send_keys_by_xpath(
            driver,
            '//*[@id="page-content"]/section[2]/div[2]/article/div[2]/div/div[5]/form/div/div[3]/div[1]/div[2]/div/div[2]/div/div/div/input[2]',
            self.destination)
        #time.sleep(1)
        se.click_by_id(driver, self.dest_id)

        se.send_keys_by_xpath(
            driver,
            '//*[@id="page-content"]/section[2]/div[2]/article/div[2]/div/div[5]/form/div/div[3]/div[1]/div[3]/div[1]/div/div[1]/div/div[1]/div/div[2]/input',
            self.date)

        se.click_by_xpath(
            driver,
            '//*[@id="page-content"]/section[2]/div[2]/article/div[2]/div/div[5]/form/div/div[3]/div[1]/div[4]/div[1]/div[2]'
        )
        #pos = driver.find_element_by_xpath('//*[@id="page-content"]/section[2]/div[2]/article/div[2]/div/div[5]/form/div/div[3]/div[1]/div[4]/div[2]/div[1]/ul/li[2]/div/div[2]/input')
        #pos.clear()
        #pos.send_keys(self.quantity)
        #se.send_keys_by_name(driver, '/sessionWorkflow/productWorkflow[@product='Rail']/tripRequirements/allJourneyRequirements/@adultTravellers', self.quantity)
        se.click_by_id(driver, 'findtrains')
Beispiel #2
0
 def pick_train(self):
     se.click_by_name(
         driver,
         "/sessionWorkflow/productWorkflow[@product='Rail']/selectedJourney[1]/@selectedPassengerFareBeanKey"
     )
     se.click_by_xpath(
         driver,
         "/html/body/div[3]/div/div/div[3]/div[2]/div[3]/form[1]/table/tbody/tr[3]/td/div/input"
     )
     se.click_by_xpath(
         driver,
         "/html/body/div[2]/div/div/div[2]/form/div[2]/div[2]/input")