def test_03(self): """案件列表-姓名查询""" try: self.homepage.mediator_login(users.user_tjy['username'], users.user_tjy['pwd']) case_list_page = CaseListPage(self.homepage) search = case_list_page._get_search(type_="name") case_list_page.search(search) # 获取返回页面纠纷状态 result = case_list_page.verification_search_name(search) self.assertEqual(True, result) except Exception as msg: print "EXCEPTION >> {}".format(msg) # class function name_class docstring docstr = getdoc( getattr(self, getframeinfo(currentframe()).function)) name = _funcname_docstring(self, docstr.decode('utf8')) # 截图 self.homepage.save_screen_shot(name) raise finally: self.end = datetime.datetime.now() duration = (self.end - self.start).seconds print "###case duration: {}###".format(duration)
def test_08(self): """调解员-登记纠纷保存-申非法人组织-被法人""" jf_info = { "jf_desc": u"调解员-登记纠纷保存-申非法人组织-被法人", "applicant_type": u"非法人组织", # 自然人 法人 非法人组织 "disputer_type": u"法人", # 自然人 法人 非法人组织 "agent_type": "", # "" common special, "agent_b_type": "", # common special, } jf_info_all.update(jf_info) try: self.homepage.mediator_login(users.user_tjy['username'], users.user_tjy['pwd']) disputepage = DisputePageTjy(self.homepage) disputepage.save(**jf_info_all) sleep(t) res = disputepage.verification_save(**jf_info_all) self.assertEqual(True, res) except Exception as msg: print "EXCEPTION >> {}".format(msg) # class function name_class docstring docstr = getdoc( getattr(self, getframeinfo(currentframe()).function)) name = _funcname_docstring(self, docstr.decode('utf8')) # 截图 self.homepage.save_screen_shot(name) raise
def test_03(self): """选择查询-驳回申请""" select_status = u'驳回申请' try: self.homepage.mediator_login(users.user_bafg['username'], users.user_bafg['pwd']) judgepage = JudgePage(self.homepage) judgepage.act_search_select(select_status) result = judgepage.verfc_act_search_select(select_status) self.assertEqual(result, True) except Exception as msg: print "EXCEPTION >> {}".format(msg) # class function name_class docstring docstr = getdoc( getattr(self, getframeinfo(currentframe()).function)) name = _funcname_docstring(self, docstr.decode('utf8')) # 截图 self.homepage.save_screen_shot(name) raise finally: self.end = datetime.datetime.now() duration = (self.end - self.start).seconds print "###case duration: {}###".format(duration)
def test_02(self): """等待调解-调解失败""" try: self.homepage.mediator_login(users.user_tjy['username'], users.user_tjy['pwd']) case_list_page = CaseListPage(self.homepage) case_list_page.mediate_failed() # 获取返回页面纠纷状态 dispute_status = case_list_page.get_detail_dispute_status() result = case_list_page.verification_dispute_status( dispute_status, u"调解失败") self.assertEqual(True, result) except Exception as msg: print "EXCEPTION >> {}".format(msg) # class function name_class docstring docstr = getdoc( getattr(self, getframeinfo(currentframe()).function)) name = _funcname_docstring(self, docstr.decode('utf8')) # 截图 self.homepage.save_screen_shot(name) raise finally: self.end = datetime.datetime.now() duration = (self.end - self.start).seconds print "###case duration: {}###".format(duration)
def test_09(self): """在线司法确认列表-案件详情-材料选择-代理类 """ select_type = u"代理类" try: self.homepage.mediator_login(tjy, pwd, url=T1) page = TjyJudicialInfoPage(self.homepage) page.act_goto_jidicial_info() page.act_case_material_select(select_type) res = page.verfc_act_case_material_select(select_type) self.assertEqual(res, True) except Exception as msg: print "EXCEPTION >> {}".format(msg) # class function name_class docstring docstr = getdoc( getattr(self, getframeinfo(currentframe()).function)) # name= _funcname_docstring(self, docstr.decode('utf8')) name = _funcname_docstring(self, docstr) # 截图 self.homepage.save_screen_shot(name) raise finally: self.end = datetime.datetime.now() duration = (self.end - self.start).seconds print "###case duration: {}###".format(duration)
def test_01(self): """调解员-司法确认-法人-非法人组织-代 """ jf_info = { "jf_desc": u"调解员-司法确认-法人-非法人组织-代", "applicant_type": u"法人", # 自然人 法人 非法人组织 "disputer_type": u"非法人组织", # 自然人 法人 非法人组织 "agent_type": "", # "" common special, "agent_b_type": "special", # common special, } jf_info_all.update(jf_info) try: self.homepage.mediator_login(tjy, pwd, url=T1) page = TjyJudicialPage(self.homepage) page.act_judicial_commit(**jf_info_all) res, ApplyJudicialList.case_id = page.verification_judicial_commit( jf_info_all['jf_desc']) self.assertEqual(res, True) except Exception as msg: print "EXCEPTION >> {}".format(msg) # class function name_class docstring docstr = getdoc( getattr(self, getframeinfo(currentframe()).function)) name = _funcname_docstring(self, docstr.decode('utf8')) # 截图 self.homepage.save_screen_shot(name)
def test_22(self): """正在调解-预约调解""" try: self.homepage.mediator_login(users.user_tjy['username'], users.user_tjy['pwd']) case_list_page = CaseListPage(self.homepage) case_list_page.mediate_video_create(search=self.case_id, dispute_status=u'正在调解') # 获取返回页面纠纷状态 conference_title = case_list_page.get_conference_title() result = case_list_page.verification_dispute_status( conference_title, "conference_title") self.assertEqual(True, result) except Exception as msg: print "EXCEPTION >> {}".format(msg) # class function name_class docstring docstr = getdoc( getattr(self, getframeinfo(currentframe()).function)) name = _funcname_docstring(self, docstr.decode('utf8')) # 截图 self.homepage.save_screen_shot(name) raise finally: self.end = datetime.datetime.now() duration = (self.end - self.start).seconds print "###case duration: {}###".format(duration)
def test_06(self): """纠纷登记列表-查询-纠纷编号""" try: self.homepage.mediator_login(users.user_tjy['username'], users.user_tjy['pwd']) case_list_page = InputCaseListPage(self.homepage) case_list_page._into_input_case_list() dis_id = case_list_page.get_search_No() # case_list_page.search(dis_id) # result = case_list_page.verification_search_No(dis_id) self.assertEqual(True, result) except Exception as msg: print "EXCEPTION >> {}".format(msg) # class function name_class docstring docstr = getdoc( getattr(self, getframeinfo(currentframe()).function)) name = _funcname_docstring(self, docstr.decode('utf8')) # 截图 self.homepage.save_screen_shot(name) raise finally: self.end = datetime.datetime.now() duration = (self.end - self.start).seconds print "###case duration: {}###".format(duration)
def test_04(self): """纠纷登记列表-纠纷预览-保存""" # 1,纠纷登记列表-已提交-纠纷预览 # 2,修改纠纷描述、诉求 # 3,保存 try: self.homepage.mediator_login(users.user_tjy['username'], users.user_tjy['pwd']) case_list_page = InputCaseListPage(self.homepage) case_list_page.case_modification_save() # 获取返回页面纠纷状态 result = case_list_page.verification_dispute_modification() self.assertEqual(True, result) except Exception as msg: print "EXCEPTION >> {}".format(msg) # class function name_class docstring docstr = getdoc( getattr(self, getframeinfo(currentframe()).function)) name = _funcname_docstring(self, docstr.decode('utf8')) # 截图 self.homepage.save_screen_shot(name) raise finally: self.end = datetime.datetime.now() duration = (self.end - self.start).seconds print "###case duration: {}###".format(duration)
def test_10(self): """调解员-登记纠纷提交-申非法人组织代理人-被非法人组织 """ jf_info = { "jf_desc": u"调解员-登记纠纷提交-申非法人组织代理人-被非法人组织", "applicant_type": u"非法人组织", # 自然人 法人 非法人组织 "disputer_type": u"非法人组织", # 自然人 法人 非法人组织 "agent_type": "special", # "" common special, "agent_b_type": "", # common special, } jf_info_all.update(jf_info) try: self.homepage.mediator_login(users.user_tjy['username'], users.user_tjy['pwd']) disputepage = DisputePageTjy(self.homepage) disputepage.commit(**jf_info_all) sleep(t) res, _ = disputepage.verification_commit(**jf_info_all) self.assertEqual(True, res) except Exception as msg: print "EXCEPTION >> {}".format(msg) # class function name_class docstring docstr = getdoc( getattr(self, getframeinfo(currentframe()).function)) name = _funcname_docstring(self, docstr.decode('utf8')) # 截图 self.homepage.save_screen_shot(name) raise finally: self.end = datetime.datetime.now() duration = (self.end - self.start).seconds print "###case duration: {}###".format(duration)
def test_03(self): """在线司法确认列表-选择查询-驳回申请 """ select_status = u'驳回申请' try: self.homepage.mediator_login(tjy, pwd, url=T1) page = TjyJudicialPage(self.homepage) page.act_search_judicial_list(select_status=select_status) res, JudicialList.case_id = page.verfc_act_search_judicial_list_status( select_status) self.assertEqual(res, True) except Exception as msg: print "EXCEPTION >> {}".format(msg) # class function name_class docstring docstr = getdoc( getattr(self, getframeinfo(currentframe()).function)) name = _funcname_docstring(self, docstr.decode('utf8')) # 截图 self.homepage.save_screen_shot(name) raise finally: self.end = datetime.datetime.now() duration = (self.end - self.start).seconds print "###case duration: {}###".format(duration)
def test_02(self): """用户改回原密码""" print "oldpwd: ", old try: self.homepage.user_login(users.user_wfm['username'], new) self.homepage.user_personal_center() personalpage = PersonalPage(self.homepage) personalpage.modify_passwd(new, old) except Exception as msg: print "EXCEPTION >> {}".format(msg) # class function name_class docstring docstr = getdoc( getattr(self, getframeinfo(currentframe()).function)) name = _funcname_docstring(self, docstr.decode('utf8')) # 截图 self.homepage.save_screen_shot(name) raise
def test_04(self): """纠纷登记列表-删除""" try: self.homepage.mediator_login(users.user_tjy['username'], users.user_tjy['pwd']) case_list_page = InputCaseListPage(self.homepage) case_list_page.dispute_delete() # 获取返回页面纠纷状态 # result = case_list_page.verification_dispute_modification() # self.assertEqual(True, result) except Exception as msg: print "EXCEPTION >> {}".format(msg) # class function name_class docstring docstr = getdoc(getattr(self, getframeinfo(currentframe()).function)) name = _funcname_docstring(self, docstr.decode('utf8')) # 截图 self.homepage.save_screen_shot(name) raise
def test_01(self): """简易案件登记-申请人-被申请人""" simple_jf_info = { "applicant": u"段志勇", "applicant_tel": "15895996954", "applicant_id": "", "applicant_nation": u"汉族", "applicant_job": u"测试工程师", "applicant_addr": u"1栋2单元303", "disputer": u"王发明", "disputer_tel": '13913031374', "disputer_nation": u"汉族", "disputer_job": "", "disputer_addr": "", "agent_name": u"徐传珠", "agent_tel": '15295745648', "agent_id": '321281199507077775', "agent_name_b": u"钱桂林", "agent_tel_b": '13160077223', "agent_id_b": "321023199508166636", "jf_desc": u"简易案件登记-申请人-被申请人", "jf_appeal": u"类型是否正确", "jf_action": u"验证类型", "jf_time": u"三天" } try: self.homepage.mediator_login(users.user_tjy['username'], users.user_tjy['pwd']) simple_page = SimpleDisputePage(self.homepage) simple_page.simple_jf_input(**simple_jf_info) simple_page.commit() res = simple_page.verification_commit(**simple_jf_info) self.assertEqual(True, res) except Exception as msg: print "EXCEPTION >> {}".format(msg) # class function name_class docstring docstr = getdoc( getattr(self, getframeinfo(currentframe()).function)) name = _funcname_docstring(self, docstr.decode('utf8')) # 截图 self.homepage.save_screen_shot(name) raise
def test_05(self): """进入案件详情""" try: self.homepage.mediator_login(users.user_bafg['username'], users.user_bafg['pwd']) judgepage = JudgePage(self.homepage) judgepage.act_goto_case_detail() except Exception as msg: print "EXCEPTION >> {}".format(msg) # class function name_class docstring docstr = getdoc( getattr(self, getframeinfo(currentframe()).function)) name = _funcname_docstring(self, docstr.decode('utf8')) # 截图 self.homepage.save_screen_shot(name) raise finally: self.end = datetime.datetime.now() duration = (self.end - self.start).seconds print "###case duration: {}###".format(duration)
def test_06(self): """纠纷预览-提交""" try: self.homepage.organization_user_login(users.user_jgdjy['username'], users.user_jgdjy['pwd']) disputepage = DisputePageDjy(self.homepage) disputepage.act_dispute_list_info_commit() except Exception as msg: print "EXCEPTION >> {}".format(msg) # class function name_class docstring docstr = getdoc( getattr(self, getframeinfo(currentframe()).function)) name = _funcname_docstring(self, docstr.decode('utf8')) # 截图 self.homepage.save_screen_shot(name) raise finally: self.end = datetime.datetime.now() duration = (self.end - self.start).seconds print "###case duration: {}###".format(duration)
def test_02(self): """纠纷登记列表-添加纠纷-提交""" # 1,纠纷登记列表-已提交-添加纠纷 # 2,修改纠纷描述 # 3,-提交 desc = u"纠纷登记列表-添加纠纷-提交" try: self.homepage.mediator_login(users.user_tjy['username'], users.user_tjy['pwd']) case_list_page = InputCaseListPage(self.homepage) case_list_page.dispute_add_commit(desc) # 获取返回页面纠纷状态 result = case_list_page.verification_add_commit(desc) self.assertEqual(True, result) except Exception as msg: print "EXCEPTION >> {}".format(msg) # class function name_class docstring docstr = getdoc(getattr(self, getframeinfo(currentframe()).function)) name = _funcname_docstring(self, docstr.decode('utf8')) # 截图 self.homepage.save_screen_shot(name) raise
def test_08(self): """批量受理按钮""" org_admin = {"机构账号": "17612156739", "机构密码": "123456"} try: self.homepage.organization_login(org_admin["机构账号"], org_admin["机构密码"]) orgpage = MissionCenter(self.homepage) orgpage.in_mission_center() result = orgpage.click_batch_process() self.assertEquals(result, True, msg='批量受理按钮点击失败') except Exception as msg: print "EXCEPTION >> {}".format(msg) # class function name_class docstring docstr = getdoc( getattr(self, getframeinfo(currentframe()).function)) name = _funcname_docstring(self, docstr.decode('utf8')) # 截图 self.homepage.save_screen_shot(name) raise
def test_12(self): """机构管理员受理纠纷、分配调解员""" org_admin = {"机构账号": "17612156739", "机构密码": "123456"} try: self.homepage.organization_login(org_admin["机构账号"], org_admin["机构密码"]) orgpage = MissionCenter(self.homepage) orgpage.in_mission_center() orgpage.case_time() casenumber = orgpage.get_an_unaccept_case() # 获取一个未受理纠纷编号 case_optioninfo = {"编号/姓名/案号": casenumber, "分配调解员姓名": u"宋红波"} print(case_optioninfo["编号/姓名/案号"]) orgpage.search_case_by_id_or_name(**case_optioninfo) # 检索纠纷 orgpage.case_acceptance() # 点击受理 orgpage.tip_agree() # 重要提示 确定 orgpage.info_agree() # 信息 确定 sleep(1) orgpage.case_select_mediator() orgpage.case_mediator_choose(**case_optioninfo) result = orgpage.verfc_case_assignable(casenumber) self.assertEquals(result, True, msg='案件分配调解员失败') except Exception as msg: print "EXCEPTION >> {}".format(msg) # class function name_class docstring docstr = getdoc( getattr(self, getframeinfo(currentframe()).function)) name = _funcname_docstring(self, docstr.decode('utf8')) # 截图 self.homepage.save_screen_shot(name) raise
def test_07(self): """案件搜索重置""" org_admin = {"机构账号": "17612156739", "机构密码": "123456"} case_optioninfo = { "编号/姓名/案号": "166575BAC9777", } try: self.homepage.organization_login(org_admin["机构账号"], org_admin["机构密码"]) orgpage = MissionCenter(self.homepage) orgpage.in_mission_center() orgpage.case_time() sleep(1) total_casenumber1 = orgpage.get_total_case_num() orgpage.search_case_by_id_or_name(**case_optioninfo) # 检索纠纷 total_casenumber2 = orgpage.get_total_case_num() orgpage.clear_search_case_area() sleep(1) total_casenumber3 = orgpage.get_total_case_num() result = orgpage.verfc_case_search_clear_successful( total_casenumber1, total_casenumber2, total_casenumber3) self.assertEquals(result, True, msg='搜索重置功能校验失败') except Exception as msg: print "EXCEPTION >> {}".format(msg) # class function name_class docstring docstr = getdoc( getattr(self, getframeinfo(currentframe()).function)) name = _funcname_docstring(self, docstr.decode('utf8')) # 截图 self.homepage.save_screen_shot(name) raise
def test_01(self): """用户-登记纠纷-申自然人-被自然人""" jf_info_all = { "jf_desc": u"用户-登记纠纷-申自然人-被自然人", "applicant_type": u"自然人", # 自然人 法人 非法人组织 "disputer_type": u"自然人", # 自然人 法人 非法人组织 "agent_type": "", # "" common special, "agent_b_type": "" # common special, } jf_info_all.update(self.dispute_info) try: self.homepage.user_login(users.user_wfm['username'], users.user_wfm['pwd']) self.homepage.user_personal_center() sleep(0.5) personalpage = PersonalPage(self.homepage) personalpage._input_all(**jf_info_all) sleep(t) res, UserApply.case_id = personalpage.verfication_commit_dlr( **jf_info_all) self.assertEqual(res, True) except Exception as msg: print "EXCEPTION >> {}".format(msg) # class function name_class docstring docstr = getdoc( getattr(self, getframeinfo(currentframe()).function)) name = _funcname_docstring(self, docstr.decode('utf8')) # 截图 self.homepage.save_screen_shot(name) raise finally: self.end = datetime.datetime.now() duration = (self.end - self.start).seconds print "###case duration: {}###".format(duration)
def test_11(self): """调解员-在线司法确认列表-司法确认详情校验 """ try: self.homepage.mediator_login(tjy, pwd, url=T1) page = TjyJudicialInfoPage(self.homepage) result = page.act_ver_judicial_info(ApplyJudicialList.case_id) self.assertEqual(result, True) except Exception as msg: print "EXCEPTION >> {}".format(msg) # class function name_class docstring docstr = getdoc( getattr(self, getframeinfo(currentframe()).function)) name = _funcname_docstring(self, docstr.decode('utf8')) # 截图 self.homepage.save_screen_shot(name) raise finally: self.end = datetime.datetime.now() duration = (self.end - self.start).seconds print "###case duration: {}###".format(duration)
def test_01(self): """一般代理人身份登录录入纠纷:申请人:自然人、法人、非法人组织|被申请人:自然人、法人、非法人组织(3v3)""" userinfo = { "UserName": "******", "PassWord": "******" } # 登录用户配置 conciliationdetail = { "纠纷类型": "交通事故", "纠纷描述": u'一般代理人身份登录录入纠纷:申请人:自然人、法人、非法人组织|被申请人:自然人、法人、非法人组织', "我的诉求": u'自动化测试成功', "纠纷发生省份": "浙江省", "纠纷发生市区": "宁波市", "纠纷发生区县": "宁海县", "纠纷发生街道": "茶院乡", "纠纷发生社区": "暂不知道", "调解机构所在省份": "浙江省", "调解机构所在市区": "宁波市", "调解机构所在区县": "宁海县", "调解机构所在街道": "", "调解机构所在社区": "", "调解机构名称": u'浙江省宁波市宁海县道路交通事故人民调解委员会' } # 申请人信息配置 multiproposer = { "roler": [{ "申请人类型": "自然人", "申请人": u"李雅莉", "申请人性别": "女", "联系电话": u"15850787868", "身份证号": u"320102196709032828", "常住省份": "浙江省", "常住市区": "宁波市", "常住区县": "宁海县", "常住街道": "茶院乡", "详细地址": u"浙江宁波" }, { "申请人类型": "法人", "申请人": u"发明", "社会信用码": "555558888877777", "法定代表人": u"哈哈", "申请人性别": "女", "联系电话": "13900000000", "身份证号": "", "单位省份": "浙江省", "单位市区": "杭州市", "单位区县": "", "单位街道": "", "详细地址": u"浙江杭州" }, { "申请人类型": "非法人组织", "申请人": u"义和团", "社会信用码": "", "机构代表人": u"桂林", "申请人性别": "男", "联系电话": "13100000000", "身份证号": "", "单位省份": "浙江省", "单位市区": "温州市", "单位区县": "", "单位街道": "", "详细地址": u"江南皮革厂" }] } # 名词解释:Claimant被申请人 # 录入多个被申请人 multiclaimant = { "roler": [{ "被申请人类型": "自然人", "被申请人姓名": u"慈禧", "被申请人性别": "女", "联系电话": u"15800006666", "身份证号": "", "常住省份": "浙江省", "常住市区": "宁波市", "常住区县": "宁海县", "常住街道": "茶院乡", "详细地址": u"浙江宁波" }, { "被申请人类型": "法人", "被申请人": u"大清王朝", "社会信用码": "123451234512345", "法定代表人": u"溥仪", "被申请人性别": "男", "联系电话": "13801240123", "身份证号": "", "单位省份": "浙江省", "单位市区": "杭州市", "单位区县": "", "单位街道": "", "详细地址": u"浙江杭州" }, { "被申请人类型": "非法人组织", "被申请人": u"太平天国", "社会信用码": "", "机构代表人": u"洪秀全", "被申请人性别": "男", "联系电话": "18966668888", "身份证号": "", "单位省份": "浙江省", "单位市区": "温州市", "单位区县": "", "单位街道": "", "详细地址": u"宁波兴化" }] } try: self.homepage.user_login(userinfo["UserName"], userinfo["PassWord"]) self.homepage.user_personal_center() # 切换到个人中心页面 sleep(0.5) # 个人中心 personalcenterpage = PersonalCenter(self.homepage) personalcenterpage.conciliation_list() casenumber_old = personalcenterpage.get_last_conciliation_number() print('当前最新' + casenumber_old) personalcenterpage.in_conciliation() # 切换到纠纷调解页面 sleep(0.5) # 角色身份选择 rolerchoosepage = RolerChoose(personalcenterpage) rolerchoosepage.normal_proxy() # 一般代理人身份 # 纠纷详情需要录入的信息(纠纷发生地必须填到街道) conciliationinfopage = ConciliationInfo(rolerchoosepage) conciliationinfopage.input_conciliation_info(**conciliationdetail) # 录入多个申请人信息 proposerinfopage = InProposerInfo(conciliationinfopage) proposerinfopage.input_proposer_info(**multiproposer) claimantinfopage = InClaimantInfo(proposerinfopage) claimantinfopage.input_claimant_info(**multiclaimant) claimantinfopage.commit() personalcenterpage = PersonalCenter(claimantinfopage) casenumber_new = personalcenterpage.get_last_conciliation_number() print('当前最新' + casenumber_new) result = personalcenterpage.verfc_conciliation_create_successful( casenumber_old, casenumber_new) self.assertEqual(result, True, msg='新旧案件编号相同,新增失败') except Exception as msg: print "EXCEPTION >> {}".format(msg) # class function name_class docstring docstr = getdoc( getattr(self, getframeinfo(currentframe()).function)) name = _funcname_docstring(self, docstr.decode('utf8')) # 截图 self.homepage.save_screen_shot(name) raise finally: self.end = datetime.datetime.now() duration = (self.end - self.start).seconds print "###case duration: {}###".format(duration)