Ejemplo n.º 1
0
 def setUp(self):
     # 获取driver
     self.driver = GetDriver.get_dirver()
     # 实例化 PageCart
     self.upload_excel = PageAddExcel(self.driver)
     # 调用成功登陆 依赖
     PageBusinessLogin(self.driver).page_login_success()
Ejemplo n.º 2
0
 def setUp(self):
     # 获取driver
     self.driver = GetDriver.get_dirver()
     # 实例化 PageCart
     self.recommendad_packages = PageRecommendadPackages(self.driver)
     # 调用成功登陆 依赖
     PageBusinessLogin(self.driver).page_login_success()
 def setUp(self):
     # 获取driver
     self.driver = GetDriver.get_dirver()
     # 实例化 PageCart
     self.additional_batch = PageAdditionalBatch(self.driver)
     # 调用成功登陆 依赖
     PageBusinessLogin(self.driver).page_login_success()
Ejemplo n.º 4
0
 def setUp(self):
     # 获取driver
     self.driver = GetDriver.get_dirver()
     # 实例化 PageCart
     self.cart = PageCart(self.driver)
     # 调用成功登陆 依赖
     PageBusinessLogin(self.driver).page_login_success()
Ejemplo n.º 5
0
 def setUpClass(cls):
     try:
         # 实例化,并获取driver
         cls.driver = GetDriver().get_dirver()
         # 实例化 PageBusinessLogin()
         cls.login = PageBusinessLogin(cls.driver)
     except Exception as e:
         log.error("错误:{}".format(e))
         # 截图
         cls.login.base_get_image()
Ejemplo n.º 6
0
 def tearDown(self):
     # 关闭driver
     GetDriver().quit_driver()
Ejemplo n.º 7
0
 def teardown_class(self):
     self.search.page_click_back()
     GetDriver().close_driver()
Ejemplo n.º 8
0
 def setup_class(self):
     self.driver = GetDriver().get_driver()
     self.search = PageSearch(self.driver)
     self.search.page_click_search()
Ejemplo n.º 9
0
 def tearDownClass(cls):
     # 关闭driver驱动
     GetDriver().quit_driver()
Ejemplo n.º 10
0
    #点击安全
    def page_click_safety(self):
        elements=self.base_find_elements(Data.unlock_safety)
        for element in elements:
            if "安全" in element.text:
                element.click()
                break
    #点击锁屏锁定方式
    def page_click_lock_screen_way(self):
        self.base_click_element(Data.unlock_lock_screen_way)

    #点击图案
    def page_click_icon(self):
        self.base_click_element(Data.unlock_lock_icon)

    #设置图案,1(90,320)   2(270,320)  3(450,320) 4(450,500)
    def page_press_move_to(self):
        TouchAction(self.driver).press(x=90,y=320).wait(2000).move_to(x=270,y=320).release().perform()


if __name__ == '__main__':
    d=GetDriver().get_driver()
    p=PageUnlock(d)
    p.page_scorll_safety()
    sleep(2)
    p.page_click_safety()
    sleep(2)
    p.page_click_lock_screen_way()
    p.page_click_icon()
    p.page_press_move_to()
Ejemplo n.º 11
0
 def setup_class(self):
     self.driver = GetDriver().get_driver()
     self.login = PageLogin(self.driver)
Ejemplo n.º 12
0
 def setUp(self):
     # 获取driver
     self.driver = GetDriver.get_dirver()
     # 实例化 Page
     self.
Ejemplo n.º 13
0
 def tearDownClass(cls):
     GetDriver().quit_driver()
Ejemplo n.º 14
0
 def setUpClass(cls):
     # 获取driver
     cls.driver = GetDriver().get_driver()
     # 初始化页面对象
     cls.login = LoginBusiness(cls.driver)