def list_text(self): if api.el_is_display(self.unfinish_workflow_list_has_data): text = api.get_text(self.unfinish_workflow_list_has_data) logger().info('待办任务列表选项标题:%s' % text) if len(text) > 0: return True else: return False elif api.get_text( self.unfinish_workflow_list_no_data) == '您的待办已经全部处理完成': return True else: api.save_page_img('待办列表显示错误') return False
def click_add_workflow_link(self): """ 点击新建流程链接 :return: """ js = '$("ul.navleft >li:eq(5) > a").click()' for i in range(10): try: api.execute_script(js) if api.get_current_url().find('/app/Workflow/MyWorkflow' ) != -1 and api.el_is_display( self.test_workflow_link): logger().info('页面跳转成功') break except: pass time.sleep(2)
def wait_speed_test_form_title_display(self): api.el_is_display(self.speed_test_form_title)