def app_status(self): """判断应用当前状态""" activity = self.wait_activity() if HomePage().wait_check_page(): # 在主界面 print('主界面') elif activity == '': # 崩溃退出 self.launch_app() # 重启APP if HomePage().wait_check_page(): # 在主界面 print('主界面') elif self.wait_check_page(): # 在登录界面 self.login() elif self.wait_check_page(): # 在登录界面 self.login() else: print('在其他页面') self.close_app() # 关闭APP self.launch_app() # 重启APP if HomePage().wait_check_page(): # 在主界面 print('主界面') elif self.wait_check_page(): # 在登录界面 self.login()
def tips_goto_pay_operate(self): """去购买""" if self.wait_check_page(10): if self.img_judge(): # 判断图片 是否存在 print('------------------------------') print('购买提示页:') self.tips_title() self.tips_content() self.goto_pay_button() # 去购买 按钮 self.buy_page_direct_operate() HomePage().back_up_button() # 返回 购买提示页 if self.wait_check_page(10): self.goto_verification().click() # 已有【提分版】, 去验证 Toast().find_toast('已更新账户信息')
def back_up(self): """从个人信息页 返回主界面""" if self.wait_check_page(): self.back_up_button() # 返回按钮 if UserCenterPage().wait_check_page(): # 页面检查点 HomePage().click_tab_hw()
def setUp(cls): """启动应用""" cls.login_page = LoginPage() cls.home_page = HomePage() cls.user_center = UserCenterPage() cls.user_info = UserInfoPage()
def setUp(cls): """启动应用""" cls.login = LoginPage() cls.home = HomePage() cls.van = VanclassPage() cls.detail = VanclassDetailPage()
def back_up(self): """从个人信息页 返回主界面""" HomePage().click_tab_hw()
def setUp(cls): """启动应用""" cls.login_page = LoginPage() cls.home_page = HomePage()
def setUp(cls): """启动应用""" cls.login_page = LoginPage() cls.home_page = HomePage() cls.homework = Homework() cls.word_book = Word_Book()
def online_services_operate(self): """在线客服""" self.online_service() # 点击在线客服 if self.wait_check_help_page(): HomePage().back_up_button()
def setUp(cls): """启动应用""" cls.login_page = LoginPage() cls.home_page = HomePage() cls.homework = Homework() cls.listening = Listening()