Beispiel #1
0
def loan_clear_approve(driver, loanno, screenshot_path, casename):
    u"""审批贷款结清流程"""
    types = "提前还款"
    clear_date = "2017-10-10"
    approve_view = "OK"
    expect_result = "还款完成"
    # self.loanno = "SK0027-BP-1801-00002"
    from com.ea.pages.todo_page import TodoPage, LoanClearApprove
    try:
        print("审批贷款结清开始")
        print("使用的贷款单号是:" + loanno)
        todopage = TodoPage(driver)
        loanclearapprovepage = LoanClearApprove(driver)
        menu.go_to_wait_todo_query(driver)
        todopage.input_yewuno(loanno)
        todopage.click_query_all()
        todopage.click_search_button()
        todopage.click_first_row(types)
        loanclearapprovepage.scroll_to_clear_date()
        loanclearapprovepage.input_clear_date(clear_date)
        loanclearapprovepage.click_save_button()
        loanclearapprovepage.click_confirm_button()
        loanclearapprovepage.input_approve_view(approve_view)
        loanclearapprovepage.click_tongguo_button()
        loanclearapprovepage.click_confirm_button()
        time.sleep(5)
        menu.go_to_loan_query(driver)
        actual_result = loanclearapprovepage.get_result(loanno)
        assert actual_result == expect_result
        print("审批贷款结清结束")
    except Exception as e:
        tools.get_screenshot(driver, screenshot_path, casename)
        raise e
Beispiel #2
0
def loan_approve_checkpoint(self, driver, loanno):
    u"""贷款审批检查点"""
    # 切换到贷款查询页面
    menu.go_to_loan_query(driver)
    time.sleep(2)
    result = driver.find_element_by_xpath(
        "//a[text()='" + loanno + "']/../following-sibling::td[7]").text
    self.assertEqual(result, "征信准入完成")
Beispiel #3
0
def interview_approve_checkpoint(self, wait, driver, loanno):
    u"""审批面签检查点"""
    # 切换到面签提报页面
    menu.go_to_loan_query(driver)
    time.sleep(2)
    wait.until(
        EC.presence_of_element_located(
            (By.XPATH,
             "//a[text()='" + loanno + "']/../following-sibling::td[7]")))
    result = driver.find_element_by_xpath(
        "//a[text()='" + loanno + "']/../following-sibling::td[7]").text
    self.assertEqual(result, "已放款")
Beispiel #4
0
def loan_by_role_approve(driver,loanno, screenshot_path, casename):
    u"""贷款审批"""
    number = "0"
    view = "OK"
    process_type = "征信准入"
    except_result = "征信准入完成"
    # self.loanno = "SK0027-BK-1712-00006"
    print("审批贷款开始")
    print("使用的贷款单号是:" + loanno)
    from com.ea.pages.todo_page import TodoPage, ApproveLoanPage
    try:
        approver_account = tools.get_approver_acount_by_yewuno(loanno, process_type)
        login.login(driver, username=approver_account)
        todopage = TodoPage(driver)
        approvepage = ApproveLoanPage(driver)
        # 进入待办查询页面
        menu.go_to_wait_todo_query(driver)
        todopage.input_yewuno(loanno)
        # todopage.click_query_all()
        todopage.click_search_button()
        todopage.click_first_row(process_type)
        approvepage.scrollto_edit()
        approvepage.click_edit()
        approvepage.input_bank_overdue(number)
        approvepage.input_credit_overdue(number)
        approvepage.input_nobank_overdue(number)
        approvepage.scrollto_save_button()
        approvepage.click_save_button()
        time.sleep(2)
        approvepage.scrollto_approve_view()
        approvepage.input_approve_view(view)
        approvepage.click_tongguo()
        approvepage.click_confirm()
        time.sleep(3)
        menu.go_to_loan_query(driver)
        time.sleep(1)
        actual_result = approvepage.get_result(loanno)
        assert actual_result == except_result
        print("审批贷款结束")
    except Exception as e:
        tools.get_screenshot(driver, screenshot_path, casename)
        raise e
Beispiel #5
0
def loan_clear(driver, payname, loanno, casename, screenshot_path):
    u"""贷款结清"""
    expect_result = "审核中"
    pay_date = "2017-10-10"
    print("申请贷款结清开始")
    print("使用的贷款单号是:" + loanno)
    try:
        menu.go_to_loan_query(driver)
        from com.ea.pages.loan_clear_page import LoanClearPage
        loanclearpage = LoanClearPage(driver)
        loanclearpage.click_loan_no(loanno)
        loanclearpage.click_loan_clear_button()
        loanclearpage.scroll_to_payman()
        loanclearpage.input_payname(payname)
        loanclearpage.input_pay_date(pay_date)
        loanclearpage.click_saveandstart()
        actual_result = loanclearpage.get_result(loanno)
        assert actual_result == expect_result
        print("申请贷款结清结束")
    except Exception as e:
        tools.get_screenshot(driver, screenshot_path, casename)
        raise e
Beispiel #6
0
def interview_approve(driver, loanno, fullname, screenshot_path, casename):
    u"""面签审批"""
    expect_result = "已放款"
    types = "面签提报"
    card_daoqi_date = "2017-10-10"
    approve_view = "OK"
    isphonecheck = "是"
    phonecheckmessage = "OK"
    isfujianover = "是"
    file_path = gl.file_path
    # self.loanno = "SK0027-BP-1801-00002"
    # self.fullname = "何器"
    print("面签审批开始")
    print("使用的贷款单号是:" + loanno)
    try:
        from com.ea.pages.todo_page import TodoPage, ApproveInterview
        todopage = TodoPage(driver)
        approveinterviepage = ApproveInterview(driver)
        menu.go_to_wait_todo_query(driver)
        todopage.input_yewuno(loanno)
        todopage.click_query_all()
        todopage.click_search_button()
        todopage.click_first_row(types)
        approveinterviepage.scroll_to_approve_view()
        approveinterviepage.input_approve_view(approve_view)
        approveinterviepage.click_tongguo()
        approveinterviepage.click_confirm()
        time.sleep(5)
        todopage.click_first_row(types)
        approveinterviepage.scroll_to_is_phone_check()
        approveinterviepage.select_is_phone_check(isphonecheck)
        approveinterviepage.input_phone_check_message(phonecheckmessage)
        approveinterviepage.click_phone_save_button()
        time.sleep(1)
        approveinterviepage.select_is_fujian_over(isfujianover)
        approveinterviepage.click_fujian_save_button()
        time.sleep(1)
        approveinterviepage.scroll_to_approve_view()
        approveinterviepage.input_approve_view(approve_view)
        approveinterviepage.click_tongguo()
        approveinterviepage.click_confirm()
        time.sleep(5)
        todopage.click_first_row(types)
        approveinterviepage.scroll_to_card_date()
        approveinterviepage.input_card_daoqi_date(card_daoqi_date)
        approveinterviepage.click_save_bank_loan_data()
        time.sleep(1)
        tools.create_huankuanjihua(fullname)
        approveinterviepage.input_file(file_path)
        time.sleep(3)
        approveinterviepage.input_approve_view(approve_view)
        approveinterviepage.click_tongguo()
        approveinterviepage.click_confirm()
        time.sleep(5)
        menu.go_to_loan_query(driver)
        actual_result = approveinterviepage.get_result(loanno)
        assert actual_result == expect_result
        print("审批面签提报结束")
    except Exception as e:
        tools.get_screenshot(driver, screenshot_path, casename)
        raise e