def __init__(self): self.driver = webdriver.Chrome() self.driver.implicitly_wait(300) url = model.get_url() self.driver.get(url)
def setUp(cls): cls.driver = webdriver.Chrome() cls.driver.implicitly_wait(300) url = model.get_url() cls.driver.get(url)
def _do(self, method): url = web.input(url='').url url_obj = model.get_url(url) if url_obj: return getattr(Request(url_obj.url, url_obj.user, url_obj.password), method)().read()
def _get_actual_on(self): url = web.input(url='').url url_obj = model.get_url(url) url_obj.url = url_obj.url.replace('?', '/actual_on?') if url_obj: return Request(url_obj.url, url_obj.user, url_obj.password).GET().read();
def GET(self, id): url = model.get_url(id) return view.url(url)