def test_non_polymerization_case(self):
        '''流程非聚合'''
        menu1 = '流程'
        menu2 = '审批送出设置'  # 主页打开菜单时使用
        menu3 = '流程非聚合'
        name = "流程非聚合"
        #time.sleep(0.5)
        comp = ProcessApproverPage(self.driver)
        # 判断是否要删除记录
        lp = ListViewPage(self.driver)
        lp.judge_delete(name)
        #李玲建单提交
        comp.launch_a_flowform(name)
        #time.sleep(0.5)
        #退出当前登录,切换账号并打开菜单记录
        comp.logoff_and_openrecord('weiqiang', '123456', menu1, menu2, menu3,
                                   name)
        #time.sleep(0.5)
        comp.direct_sumit()
        #退出当前登录,切换账号并打开菜单记录for表单
        comp.logoff_and_openmenu('zjl01', '123456', menu1, menu2, menu3)
        text = comp.openagain_to_getapprover(name)
        # 断言
        self.assertIn('张强', text, msg=name + "检验不通过")
        # 判断总经理此时有无提交按钮
        bb = comp.is_elementPresent()
        self.assertEqual("true", bb, msg=name + "检验不通过")
        #time.sleep(0.5)
        #提交后判断流程是否已归档
        bool = comp.is_filed_for_aftersumbit(name)
        self.assertIsNone(bool, msg=name + "检验不通过")

        def init(self):
            self.test_non_polymerization_case()
 def test_adjustment_process_case(self):
     '''前台手动调整流程'''
     name = '前台手动调整流程'
     comp = ProcessApproverPage(self.driver)
     btn = ButtonPage(self.driver)
     #判断是否要删除记录
     lp = ListViewPage(self.driver)
     lp.judge_delete(name)
     #点击新建进入表单
     comp.click_newbtn()
     #录入请假原因
     #time.sleep(0.5)
     comp.input_reason(name)
     #点击保存并启动按钮
     comp.click_starprocessbtn()
     #time.sleep(0.5)
     self.assertTrue(btn.is_button_visiable('流程调整'), msg=name + "检验不通过")
     lp.wait_loading_hide()  # 等待视图加载
     #点击前台流程调整按钮
     comp.click_editFlowbtn()
     #回到主文档,没有iframe
     self.driver.switch_to.default_content()
     #获取弹出框的title
     text = comp.get_popuptitle()
     self.assertEqual("调整流程", text, msg=name + "检验不通过")
     mp = MainPage(self.driver)
     mp.switch_to_div_iframe()
     self.assertTrue(comp.is_embed_visit(), msg=name + "检验不通过")
Exemplo n.º 3
0
 def test_skipprocess_case(self):
     """流程节点跳过"""
     name = "流程节点跳过"
     #time.sleep(0.5)
     comp = ProcessApproverPage(self.driver)
     #把消息关掉
     self.driver.switch_to_default_content()
     comp.close_message()
     comp.switch_to_formiframe()
     # 判断是否要删除记录
     lp = ListViewPage(self.driver)
     lp.judge_delete(name)
     # 点击新建进入表单
     comp.click_newbtn()
     # 录入请假原因
     comp.input_reason(name)
     # 点击提交按钮
     comp.click_flow_processbtn()
     # 点击确认提交
     comp.submit()
     time.sleep(10)
     # 再次相应记录
     comp.openagain_record(name)
     #表单是否已归档
     bool = comp.is_filed()
     self.assertIsNone(bool, msg=name + "检验不通过")
Exemplo n.º 4
0
    def test_editApprover_case(self):
        '''允许编辑当前节点的审批人'''
        menu1 = '流程'
        menu2 = '基本信息'  # 主页打开菜单时使用
        menu3 = '允许编辑当前节点的审批人'
        name = "允许编辑当前节点的审批人"
        #time.sleep(0.5)
        comp = ProcessApproverPage(self.driver)
        # 判断是否要删除记录
        lp = ListViewPage(self.driver)
        lp.judge_delete(name)
        #李玲建单提交
        comp.launch_a_flowform(name)
        #退出当前登录,切换账号并打开菜单记录
        comp.logoff_and_openrecord("zhangqiang", "123456", menu1, menu2, menu3,
                                   name)
        #time.sleep(0.5)
        comp.select_approver("测试主管")
        #time.sleep(0.5)
        bool = comp.is_elementPresent()
        self.assertEqual("true", bool, msg=name + "检验不通过")
        #time.sleep(0.5)
        #退出当前登录,切换账号并打开菜单记录
        comp.logoff_and_openrecord("weiqiang", "123456", menu1, menu2, menu3,
                                   name)
        #提交后判断流程是否已归档
        bool = comp.is_filed_for_aftersumbit(name)
        self.assertIsNone(bool, msg=name + "检验不通过")

        def init(self):
            self.test_editApprover_case()
Exemplo n.º 5
0
 def default_notcheck_case(self):
     """并行默认不选中"""
     name = "并行默认不选中"
     #time.sleep(0.5)
     comp = ProcessApproverPage(self.driver)
     # 判断是否要删除记录
     lp = ListViewPage(self.driver)
     lp.judge_delete(name)
     # 点击新建进入表单
     comp.click_newbtn()
     # 录入请假原因
     comp.input_reason(name)
     # 点击提交按钮
     comp.click_flow_processbtn()
     #time.sleep(0.5)
     bool1 = self.find_elem(
         'fieldset#fieldset_commit_to > div:nth-child(2)>label>input'
     ).is_selected()
     self.assertFalse(bool1, msg=name + '检验不通过')
     bool2 = self.find_elem(
         'fieldset#fieldset_commit_to > div:nth-child(3)>label>input'
     ).is_selected()
     self.assertFalse(bool2, msg=name + '检验不通过')
     self.find_elem(
         'fieldset#fieldset_commit_to > div:nth-child(2)>label>input'
     ).click()
     # 点击确认提交
     comp.submit()
     #time.sleep(0.5)
     # 再次相应记录
     comp.openagain_record(name)
     # 获取流程状态的处理人
     text = comp.get_approver()
     # 断言
     self.assertIn('王聪', text, msg=name + "检验不通过")
Exemplo n.º 6
0
    def test_arbitrarily_adopt_case(self):
        '''任意审批人通过则节点通过'''
        menu1 = '流程'
        menu2 = '流程节点通过条件'  # 主页打开菜单时使用
        menu3 = '任意审批人通过则节点通过'
        name = "任意审批人通过则节点通过"
        #time.sleep(0.5)
        comp = ProcessApproverPage(self.driver)
        #把消息关掉
        self.driver.switch_to_default_content()
        comp.close_message()
        comp.switch_to_formiframe()
        # 判断是否要删除记录
        lp = ListViewPage(self.driver)
        lp.judge_delete(name)
        comp.launch_a_flowform(name)
        comp.goback()
        comp.switch_account('zhangqiang', '123456')
        comp.close_message()
        comp.open_m(menu1,menu2,menu3)
        text = comp.openagain_to_getapprover(name)
        # 断言
        self.assertIn('王聪', text, msg=name + "检验不通过")
        # 判断总经理此时有无提交按钮
        bb = comp.is_elementPresent()
        self.assertEqual("true", bb, msg=name + "检验不通过")
        #time.sleep(0.5)
        #提交后判断流程是否已归档
        bool = comp.is_filed_for_aftersumbit(name)
        self.assertIsNone(bool, msg=name + "检验不通过")

        def init(self):
            self.test_arbitrarily_adopt_case()
Exemplo n.º 7
0
 def test_approver_iscript_case(self):
     '''流程审批人for_iscript形式'''
     menu1 = '流程'
     menu2 = '审批人设置'  # 主页打开菜单时使用
     menu3 = ''
     name = "流程审批人设置_通过iscript形式"
     #time.sleep(0.5)
     comp = ProcessApproverPage(self.driver)
     # 判断是否要删除记录
     lp = ListViewPage(self.driver)
     lp.judge_delete(name)
     #李玲新建单据
     self.lilingnew(name)
     #退出当前登录,切换账号并打开菜单记录for视图
     comp.logoff_and_openrecord('weiqiang', '123456', menu1, menu2, menu3,
                                name)
     comp.direct_sumit()  # 直接提交
     #退出切换账号,查看是否有提交按钮
     bb = comp.logoff_and_check_submitbtn('zhangqiang', '123456', menu1,
                                          menu2, menu3, name)
     self.assertEqual("true", bb, msg=name + "检验不通过")
     #time.sleep(0.5)
     #表单是否已归档
     bool = comp.is_filed_for_aftersumbit(name)
     self.assertIsNone(bool, msg=name + "检验不通过")
Exemplo n.º 8
0
    def test_allApprover_adopt_chaos_case(self):
        """所有审批人任意顺序"""
        menu1 = '流程'
        menu2 = '流程节点通过条件'  # 主页打开菜单时使用
        menu3 = '所有审批人任意顺序'
        name = "所有审批人任意顺序"
        #time.sleep(0.5)
        comp = ProcessApproverPage(self.driver)
        #把消息关掉
        self.driver.switch_to_default_content()
        comp.close_message()
        comp.switch_to_formiframe()
        # 判断是否要删除记录
        lp = ListViewPage(self.driver)
        lp.judge_delete(name)
        #time.sleep(0.5)
        #李玲建单提交
        comp.launch_a_flowform(name)
        #再次打开记录获取流程状态处理人
        text = comp.openagain_to_getapprover(name)
        #断言
        self.assertIn('王聪', text, msg=name + "检验不通过")
        #time.sleep(0.5)
        #退出切换账号,查看是否有提交按钮
        bb = comp.logoff_and_check_submitbtn("zhangqiang", "123456", menu1,
                                             menu2, menu3, name)
        self.assertEqual("true", bb, msg=name + "检验不通过")
        #time.sleep(0.5)
        #提交后再次打开表单获取流程处理人
        text2 = comp.aftersumbit_getapprover(name)
        # 断言
        self.assertIn('王聪', text2, msg=name + "检验不通过")
        #time.sleep(0.5)
        # 退出切换账号,查看是否有提交按钮
        bb2 = comp.logoff_and_check_submitbtn("weiqiang", "123456", menu1,
                                              menu2, menu3, name)
        self.assertEqual("true", bb2, msg=name + "检验不通过")
        #time.sleep(0.5)
        #提交后再次打开表单获取流程处理人
        text3 = comp.aftersumbit_getapprover(name)
        self.assertIn('王聪', text3, msg=name + "检验不通过")
        #time.sleep(0.5)
        # 退出切换账号,查看是否有提交按钮
        bb3 = comp.logoff_and_check_submitbtn("wangcong", "123456", menu1,
                                              menu2, menu3, name)
        self.assertEqual("true", bb3, msg=name + "检验不通过")
        #time.sleep(0.5)
        #提交后判断流程是否已归档
        bool = comp.is_filed_for_aftersumbit(name)
        self.assertIsNone(bool, msg=name + "检验不通过")

        def init(self):
            self.allApprover_adopt_chaos_Test()
Exemplo n.º 9
0
    def test_cc_for_iscript_case(self):
        '''流程抄送通过iscript'''
        menu1 = '流程'
        menu2 = '抄送设置'  # 主页打开菜单时使用
        menu3 = '流程抄送通过iscript'
        name = "流程抄送通过iscript"
        name2 = "消息中心"
        comp = ProcessApproverPage(self.driver)
        comp.goback()
        comp.switch_account('zhangqiang', '123456')
        comp.go_messagecenter_toclear()  #进入消息中心清空工作事项通知
        self.assertEqual(0,
                         comp.get_messagecenter_totalRowPanel(),
                         msg='进入消息中心清空工作事项通知失败')
        #张强去消息中心清空数据
        #退出登录#33
        comp.goback()
        # 切换账号登陆
        comp.switch_account('liling', '123456')
        #李玲发起请假申请单
        comp.open_m(menu1, menu2, menu3)
        # 判断是否要删除记录
        lp = ListViewPage(self.driver)
        lp.judge_delete(name)
        comp.click_newbtn()
        #comp.switch_to_formiframe()
        #李玲建单提交
        # 录入请假原因
        comp.input_reason(name)
        # 点击提交按钮
        comp.click_flow_processbtn()
        #选择抄送人
        comp.select_user_by_rolename("自动化测试组长")
        # 返回到表单所在的iframe
        comp.switch_to_formiframe()
        #time.sleep(0.5)
        # 点击确认提交
        comp.submit()
        #time.sleep(0.5)
        #退出登录
        comp.goback()
        #张强进入消息中心获取抄送消息
        comp.switch_account('zhangqiang', '123456')
        #获取消息中心的工作事项内容
        text = comp.get_messagecentercontent()
        self.assertIn("流程抄送", text, msg=name + "检验不通过")

        def init(self):
            self.test_cc_for_iscript_case()
Exemplo n.º 10
0
 def test_Fallback_case(self):
     '''流程回退'''
     menu1 = '流程'
     menu2 = '流程通知'  # 主页打开菜单时使用
     menu3 = '流程回退'
     name = "流程回退"
     #time.sleep(0.5)
     comp = ProcessApproverPage(self.driver)
     #把消息关掉
     self.driver.switch_to_default_content()
     comp.close_message()
     comp.switch_to_formiframe()
     # 判断是否要删除记录
     lp = ListViewPage(self.driver)
     lp.judge_delete(name)
     #李玲建单提交
     comp.launch_a_flowform(name)
     #进入消息中心清空工作事项通知
     comp.go_messagecenter_toclear()
     #退出切换账号,查看是否有提交按钮
     bb = comp.logoff_and_check_submitbtn("zhangqiang", "123456", menu1,
                                          menu2, menu3, name)
     self.assertEqual("true", bb, msg=name + "检验不通过")
     #time.sleep(0.5)
     comp.click_fallbackbtn()
     #退出登录
     comp.goback()
     #切换张强账号登陆,
     comp.switch_account("liling", "123456")
     #获取消息中心的工作事项内容
     text = comp.get_messagecentercontent()
     self.assertIn("流程回退", text, msg=name + "检验不通过")
     bname = '消息中心'
     comp.close_tab(bname)
     # 回到主文档,没有iframe
     self.driver.switch_to.default_content()
     # 打开菜单c
     comp.open_m(menu1, menu2, menu3)
     #time.sleep(0.5)
     #检查有没有提交按钮
     bb = comp.is_submit_existed(name)
     self.assertEqual("true", bb, msg=name + "检验不通过")
     #time.sleep(0.5)
     #提交后再次打开表单获取流程处理人
     text = comp.aftersumbit_getapprover(name)
     #time.sleep(0.5)
     self.assertIn('张强', text, msg=name + "检验不通过")
Exemplo n.º 11
0
 def test_approver_organization_case(self):
     '''流程审批人for组织形式'''
     name = "流程审批人设置_通过组织"
     #time.sleep(0.5)
     comp = ProcessApproverPage(self.driver)
     self.driver.switch_to_default_content()
     comp.close_message()
     comp.switch_to_formiframe()
     # 判断是否要删除记录
     lp = ListViewPage(self.driver)
     lp.judge_delete(name)
     #李玲新建单据#333333
     self.lilingnew(name)
     #再次打开记录获取流程状态处理人
     text = comp.openagain_to_getapprover(name)
     #断言
     self.assertIn('伟强', text, msg=name + "检验不通过")
Exemplo n.º 12
0
    def test_Hang_case(self):
        '''流程挂起'''
        menu1 = '流程'
        menu2 = '流程通知'  # 主页打开菜单时使用
        menu3 = '流程挂起'
        name = "流程挂起"
        #time.sleep(0.5)
        comp = ProcessApproverPage(self.driver)
        # 判断是否要删除记录
        lp = ListViewPage(self.driver)
        lp.judge_delete(name)
        #李玲建单提交
        comp.launch_a_flowform(name)
        #退出登录
        comp.goback()
        #切换张强账号登陆,
        comp.switch_account("zhangqiang", "123456")
        comp.close_message()
        # 打开菜单
        comp.open_m(menu1, menu2, menu3)
        #time.sleep(0.5)
        #检查有没有提交按钮
        bb = comp.is_submit_existed(name)
        self.assertEqual("true", bb, msg=name + "检验不通过")
        #time.sleep(0.5)
        comp.click_hangbtn()
        #time.sleep(0.5)
        bb2 = comp.is_elementPresent()
        self.assertEqual("false", bb2, msg=name + "检验不通过")
        #time.sleep(0.5)
        comp.click_retracementbtn()
        #time.sleep(0.5)
        bb3 = comp.is_elementPresent()
        self.assertEqual("true", bb3, msg=name + "检验不通过")
        #time.sleep(0.5)
        comp.direct_sumit()
        #time.sleep(0.5)
        #'''表单是否已归档'''
        bool = comp.is_filed_for_openagin(name)
        self.assertIsNone(bool, msg=name + "检验不通过")

        def init(self):
            self.test_Hang_case()
Exemplo n.º 13
0
 def test_approver_role_case(self):
     '''流程审批人for角色形式'''
     menu1 = '流程'
     menu2 = '审批人设置'  # 主页打开菜单时使用
     menu3 = ''
     name = "流程审批人设置_通过角色"
     comp = ProcessApproverPage(self.driver)
     # 判断是否要删除记录
     lp = ListViewPage(self.driver)
     lp.judge_delete(name)
     #李玲新建单据
     self.lilingnew(name)
     #退出切换账号,查看是否有提交按钮
     bb = comp.logoff_and_check_submitbtn('weiqiang', '123456', menu1,
                                          menu2, menu3, name)
     self.assertEqual("true", bb, msg=name + "检验不通过")
     #time.sleep(0.5)
     #提交后再次打开表单获取流程处理人
     text = comp.aftersumbit_getapprover(name)
     self.assertIn('张强', text, msg=name + "检验不通过")
Exemplo n.º 14
0
 def test_ccForRole_case(self):
     '''流程抄送通过角色'''
     menu1 = '流程'
     menu2 = '抄送设置'  # 主页打开菜单时使用
     menu3 = '流程抄送'
     name = "流程抄送"
     name2 = "消息中心"
     #time.sleep(0.5)
     comp = ProcessApproverPage(self.driver)
     comp.goback()
     # 伟强去消息中心清空数据
     comp.switch_account('weiqiang', '123456')
     comp.go_messagecenter_toclear()
     #退出登录#33
     comp.goback()
     # 切换账号登陆
     comp.switch_account('liling', '123456')
     #李玲发起请假申请单
     comp.open_m(menu1, menu2, menu3)
     # 判断是否要删除记录
     lp = ListViewPage(self.driver)
     lp.judge_delete(name)
     comp.click_newbtn()
     #李玲建单提交
     # 录入请假原因
     comp.input_reason(name)
     # 点击提交按钮
     comp.click_flow_processbtn()
     #选择抄送人
     comp.select_user_by_rolename("测试主管")
     # 返回到表单所在的iframe
     comp.switch_to_formiframe()
     # 点击确认提交
     comp.submit()
     #退出登录
     comp.goback()
     #张强进入消息中心获取抄送消息
     comp.switch_account('weiqiang', '123456')
     # 获取消息中心的工作事项内容
     text = comp.get_messagecentercontent()
     self.assertIn("流程抄送", text, msg=name + "检验不通过")
Exemplo n.º 15
0
 def test_adjustment_process_case(self):
     '''前台手动调整流程'''
     name = '前台手动调整流程'
     comp = ProcessApproverPage(self.driver)
     #判断是否要删除记录
     lp = ListViewPage(self.driver)
     lp.judge_delete(name)
     #点击新建进入表单
     comp.click_newbtn()
     #录入请假原因
     comp.input_reason(name)
     #点击保存并启动按钮
     comp.click_starprocessbtn()
     #点击前台流程调整按钮
     comp.click_editFlowbtn()
     #回到主文档,没有iframe
     self.driver.switch_to.default_content()
     #获取弹出框的title
     text = comp.get_popuptitle()
     self.assertEqual("调整流程", text, msg=name + "检验不通过")
     self.assertTrue(comp.is_embed_visit(), msg=name + "检验不通过")
Exemplo n.º 16
0
 def test_polymerization_case(self):
     '''流程聚合'''
     menu1 = '流程'
     menu2 = '审批送出设置'  # 主页打开菜单时使用
     menu3 = '流程聚合'
     name = "流程聚合"
     #time.sleep(0.5)
     comp = ProcessApproverPage(self.driver)
     #判断是否要删除记录
     lp = ListViewPage(self.driver)
     lp.judge_delete(name)
     #李玲建单提交
     comp.launch_a_flowform(name)
     #time.sleep(0.5)
     #退出当前登录,切换账号并打开菜单记录for视图
     comp.logoff_and_openrecord('weiqiang', '123456', menu1, menu2, menu3,
                                name)
     #time.sleep(0.5)
     comp.direct_sumit()
     #再次打开记录获取流程状态处理人
     text = comp.openagain_to_getapprover(name)
     self.assertIn('张强', text, msg=name + "检验不通过")
     #退出切换账号,查看是否有提交按钮
     bb = comp.logoff_and_check_submitbtn('zjl01', '123456', menu1, menu2,
                                          menu3, name)
     self.assertEqual("false", bb, msg=name + "检验不通过")
     # 退出当前登录,切换账号并打开菜单记录for视图
     comp.logoff_and_openrecord('zhangqiang', '123456', menu1, menu2, menu3,
                                name)
     #time.sleep(0.5)
     comp.direct_sumit()
     #time.sleep(0.5)
     # 退出当前登录,切换账号并打开菜单记录for视图
     comp.logoff_and_openrecord('zjl01', '123456', menu1, menu2, menu3,
                                name)
     #time.sleep(0.5)
     #表单是否已归档
     bool2 = comp.is_filed_for_aftersumbit(name)
     self.assertIsNone(bool2, msg=name + "检验不通过")
Exemplo n.º 17
0
    def test_retreat_case(self):
        '''流程回撤'''
        menu1 = '流程'
        menu2 = '流程通知'  # 主页打开菜单时使用
        menu3 = '流程回撤'
        name = "流程回撤"
        #time.sleep(0.5)
        comp = ProcessApproverPage(self.driver)
        # 判断是否要删除记录
        lp = ListViewPage(self.driver)
        lp.judge_delete(name)
        #李玲建单提交
        comp.launch_a_flowform(name)
        #退出切换账号,查看是否有提交按钮
        bb = comp.logoff_and_check_submitbtn("zhangqiang", "123456", menu1,
                                             menu2, menu3, name)
        self.assertEqual("true", bb, msg=name + "检验不通过")
        #time.sleep(0.5)
        #退出切换账号,查看是否有提交按钮
        bb2 = comp.logoff_and_check_submitbtn("liling", "123456", menu1, menu2,
                                              menu3, name)
        self.assertEqual("false", bb2, msg=name + "检验不通过")
        #time.sleep(0.5)
        bool = comp.is_btn_existed("act_flow_retracement")
        self.assertTrue(bool, msg=name + "检验不通过")
        #time.sleep(0.5)
        #点击回撤按钮
        comp.click_retreatbtn()
        #time.sleep(0.5)
        text = comp.get_approver()
        self.assertIn("李玲", text, msg=name + "检验不通过")
        #time.sleep(0.5)
        comp.direct_sumit()
        text2 = comp.openagain_to_getapprover(name)
        self.assertIn("张强", text2, msg=name + "检验不通过")

        def init(self):
            self.test_retreat_case()
Exemplo n.º 18
0
    def test_timeout_submit_case(self):
        """超时自动提交"""
        name = "审批超时自动提交"
        #time.sleep(0.5)
        comp = ProcessApproverPage(self.driver)
        #把消息关掉
        self.driver.switch_to_default_content()
        comp.close_message()  #关闭消息中心提示
        comp.switch_to_formiframe()
        # 判断是否要删除记录
        lp = ListViewPage(self.driver)
        lp.judge_delete(name)
        # 点击新建进入表单
        comp.click_newbtn()
        # 录入请假原因
        comp.input_reason(name)
        # 点击提交按钮
        comp.click_flow_processbtn()
        comp.wait_elem_visible('div[data-type="nodeItem"]')  #等待提交节点显示
        # 点击确认提交
        comp.submit()
        # 再次相应记录
        comp.openagain_record(name)
        # 获取流程状态的处理人
        text = comp.get_approver()
        # 断言
        self.assertIn('王聪', text, msg=name + "检验不通过")
        #点击返回按钮
        comp.click_rebackbtn()
        time.sleep(60)  #等待系统超时自动提交,再验证是否已提交
        # 再次相应记录
        comp.openagain_record(name)
        #time.sleep(0.5)
        bool = comp.is_filed()
        self.assertIsNone(bool, msg=name + "检验不通过")

        def init(self):
            self.test_timeout_submit_case()
Exemplo n.º 19
0
    def test_termination_case(self):
        '''允许审批人终止流程'''
        menu1 = '流程'
        menu2 = '基本信息'  # 主页打开菜单时使用
        menu3 = '允许审批人终止流程'
        name = "允许审批人终止流程"
        #time.sleep(0.5)
        comp = ProcessApproverPage(self.driver)
        # 判断是否要删除记录
        lp = ListViewPage(self.driver)
        lp.judge_delete(name)
        #李玲建单提交
        comp.launch_a_flowform(name)
        #退出当前登录,切换账号并打开菜单记录for视图
        comp.logoff_and_openrecord("zhangqiang", "123456",menu1, menu2, menu3,name)
        #time.sleep(0.5)
        comp.click_terminationbtn() #点击终止按钮
        #time.sleep(0.5)
        # 判段是否已归档
        bool = comp.is_filed()
        self.assertIsNone(bool, msg=name + "检验不通过")

        def init(self):
            self.test_termination_case()
    def test_default_lockandcheck_case(self):
        """并行默认选中并锁定"""
        name = "并行默认选中并锁定"
        #time.sleep(0.5)
        comp = ProcessApproverPage(self.driver)
        #把消息关掉
        self.driver.switch_to_default_content()
        comp.close_message()
        comp.switch_to_formiframe()
        # 判断是否要删除记录
        lp = ListViewPage(self.driver)
        lp.judge_delete(name)
        # 点击新建进入表单
        comp.click_newbtn()
        # 录入请假原因
        comp.input_reason(name)
        # 点击提交按钮
        comp.click_flow_processbtn()
        #time.sleep(0.5)
        bool1 = comp.find_elem('fieldset#fieldset_commit_to > div:nth-child(2)>label>input').get_attribute('locked')
        self.assertTrue(bool1, msg=name + '检验不通过')
        bool2 = comp.find_elem('fieldset#fieldset_commit_to > div:nth-child(3)>label>input').get_attribute('locked')
        self.assertTrue(bool2, msg=name + '检验不通过')
        comp.find_elem('fieldset#fieldset_commit_to > div:nth-child(2)>label>input').click()
        # 点击确认提交
        comp.submit()
        #time.sleep(0.5)
        # 再次相应记录
        comp.openagain_record(name)
        # 获取流程状态的处理人
        text = comp.get_approver()
        # 断言
        self.assertIn('王聪', text, msg=name + "检验不通过")

        def init(self):
            self.test_default_lockandcheck_case()