Ejemplo n.º 1
0
    def writer(self):
        print("Bekræft følgende indstillinger: ")
        [print(k, ": ", v) for k, v in self.settings.items()]

        if input("Y/n\n") not in ["Y", "y"]:
            print("ret instillinger og prøv igen")
            return
        else:
            self.d = Browser(self.settings)
            KlubModul(settings=self.settings, driver=self.d)
Ejemplo n.º 2
0
class MyTest(unittest.TestCase):
    def setUp(self):
        self.driver = Browser()
        self.driver.implicitly_wait(10)
        self.driver.maximize_window()

    def tearDown(self):
        self.driver.quit()
Ejemplo n.º 3
0
class MyTest(unittest.TestCase):
	def setUp(self):
		self.driver=Browser()
		self.driver.implicitly_wait(10)
		self.driver.maximize_window()

	def tearDown(self):
		self.driver.quit()
Ejemplo n.º 4
0
 def delete_all_events(self):
     self.d = Browser(settings=self.settings)
     KlubModulDeleter(settings=self.settings, driver=self.d)
Ejemplo n.º 5
0
from simulator import BookingSimulator
from captchaRec import rec_run
from driver import Browser
import time, random


if __name__ == '__main__':
    username = input('12306账户名:')
    password = input('12306账户密码:')
    from_station = input('始发站:')
    to_station = input('到达站:')
    date = input('出发日期:')
    

    simulator = BookingSimulator(username, password, from_station, to_station, date)
    browser = Browser()  # 通过Selenium驱动浏览器获取设备信息 
    
    
    print('与服务器创建会话...\n')
    browser.init()
    browser.ticket_check(from_station, to_station)
    cookie = browser.get_cookie()
    BIGipServerotn = cookie['BIGipServerotn']
    jsessionid = cookie['JSESSIONID']
    route = cookie['route']
    dfp = cookie['RAIL_DEVICEID']
    exp = cookie['RAIL_EXPIRATION']
    

    print('查询余票...')
    cookie_for_ticket = {
Ejemplo n.º 6
0
 def setUp(self):
     self.driver = Browser()
     self.driver.implicitly_wait(10)
     self.driver.maximize_window()
Ejemplo n.º 7
0
	def setUp(self):
		self.driver=Browser()
		self.driver.implicitly_wait(10)
		self.driver.maximize_window()