def __init__(self): self.audit_content_page = AuditContentPage() self.driver = UtilsDriver.get_mis_driver()
def __init__(self): self.publish_article_page = PublishArticlePage() self.driver = UtilsDriver.get_ttmp_driver()
def click_login_btn(self): js = "document.getElementById('inp1').removeAttribute('disabled')" UtilsDriver.get_mis_driver().execute_script(js) self.login_page.find_login_btn().click()
def __init__(self): self.driver = UtilsDriver.get_ttmp_driver()
def test_end(self): # 将关闭浏览器驱动对象关闭标识变量修改为Ture # 修改完毕之后,主动调用quit_admin_driver UtilsDriver.chang_admin_key(True) UtilsDriver.quit_admin_driver()
def __init__(self): self.driver = UtilsDriver.get_buyer_driver()
def teardown_class(self): UtilsDriver.quit_admin_driver()
def tearDownClass(cls): UtilsDriver.quit_driver()
def setup_class(self): # 获取浏览器驱动(打开测试网址) self.driver = UtilsDriver.get_admin_driver()
def setup_class(self): # 打开浏览器 --->调用utils工具中获取浏览器驱动对象的方法 self.driver = UtilsDriver.get_admin_driver()
def setUpClass(cls): # 获取浏览器驱动 cls.driver = UtilsDriver.get_driver() cls.stock_page = StockProxy()
def __init__(self): self.driver = UtilsDriver.get_mis_driver()
def test_begin(self): # 将关闭浏览器驱动对象关闭标识变量修改为False # 修改完毕之后,后续所有的测试用例在调用quit_admin_driver # 时都不会关闭浏览器 UtilsDriver.chang_admin_key(False)
def teardown_class(self): UtilsDriver.quit_ttmp_driver()
def __init__(self): # 获取浏览器驱动 self.driver = UtilsDriver.get_driver()
def setUpClass(cls): # 获取浏览器驱动对象 cls.driver = UtilsDriver.get_driver() cls.category_page = CategoryProxy()
def __init__(self): self.driver = UtilsDriver.get_admin_driver()
def input_username(self, username): self.input_text(self.wy_login_page.find_username(), username) TouchAction(UtilsDriver.get_app_driver()).tap(x=524, y=493).perform()
def teardown_class(self): UtilsDriver.quit_mis_driver()
def test_end(self): UtilsDriver.is_mis_driver = True UtilsDriver.quit_mis_driver()
def is_mobile_exist(self): return is_exist_element(UtilsDriver.get_app_driver(), self.login_page.mobile)