def test_c_loan_apply(self): u"""申请贷款""" casename = sys._getframe().f_code.co_name marray = "未婚" loantype = self.loan_type operator_mode = self.loan_mode loan_manager = "李" loan_amount = "50000" channel_name = "深圳" operator_platform = "深圳平台" print("申请贷款开始") print("采用的身份证号: " + self.cardNo) # self.cardNo = "653200198703046277" from com.ea.pages.apply_loan_page import ApplyLoanPage try: menu.go_to_loan_apply(self.driver) applyloanpage = ApplyLoanPage(self.driver) applyloanpage.input_carno(self.cardNo) applyloanpage.click_nextbutton() applyloanpage.select_marry(marray) applyloanpage.select_loantype(loantype) applyloanpage.click_confirm_button() applyloanpage.input_loanmanager(loan_manager) applyloanpage.input_loanamount(loan_amount) applyloanpage.select_managerment_mode(operator_mode) applyloanpage.input_channel_name(channel_name) applyloanpage.input_operator_platform(operator_platform) applyloanpage.click_savebutton() applyloanpage.click_choose_zhengxin_button() applyloanpage.click_afterzhengxin_savebutton() applyloanpage.page_down() applyloanpage.click_savebutton() applyloanpage.click_commit_zhengxin_in() MyTestCase.loanno = applyloanpage.get_loanno() self.assertIsNotNone(self.loanno) print("产生的贷款单号是:" + self.loanno) print("申请贷款结束") except Exception as e: tools.get_screenshot(self.driver, self.screenshot_path, casename) raise e
def test_c_loan_apply(self): u"""申请贷款""" casename = sys._getframe().f_code.co_name marray = "未婚" loantype = self.loan_type operator_mode = self.loan_mode loan_amount = "50000" sdname = "深圳沃尔玛" if self.applyer_acount == "xianhui.ling": if self.loan_mode == "共享模式": operator_platform = "惠州" else: operator_platform = "粤东" loan_manager = "周晶" elif self.applyer_acount == "feng.yun": operator_platform = "粤西" loan_manager = "陈敏芬" elif self.applyer_acount == "wenhui.zhang": if self.loan_mode == "共享模式": operator_platform = "滨州怡通" else: operator_platform = "山东" loan_manager = "张树贵" elif self.applyer_acount == "ling.cheng": operator_platform = "重庆" loan_manager = "孙姣" else: operator_platform = "深圳" loan_manager = "周晶" print("申请贷款开始") # self.cardNo = "21020019741022267X" print("采用的身份证号: " + self.cardNo) from com.ea.pages.apply_loan_page import ApplyLoanPage try: login.login(self.driver, username=self.applyer_acount) menu.go_to_loan_apply(self.driver) applyloanpage = ApplyLoanPage(self.driver) applyloanpage.input_carno(self.cardNo) applyloanpage.click_nextbutton() applyloanpage.select_marry(marray) applyloanpage.select_loantype(loantype) applyloanpage.click_confirm_button() applyloanpage.input_loanmanager(loan_manager) applyloanpage.input_loanamount(loan_amount) applyloanpage.select_managerment_mode(operator_mode) applyloanpage.input_sdname(sdname) applyloanpage.input_zy_operator_platform(operator_platform) applyloanpage.click_savebutton() applyloanpage.click_choose_zhengxin_button() applyloanpage.click_afterzhengxin_savebutton() applyloanpage.page_down() applyloanpage.click_savebutton() applyloanpage.click_commit_zhengxin_in() MyTestCase.loanno = applyloanpage.get_loanno() self.assertIsNotNone(self.loanno) print("产生的贷款单号是:" + self.loanno) print("申请贷款结束") except Exception as e: tools.get_screenshot(self.driver, self.screenshot_path, casename) raise e