Esempio n. 1
0
    def test_contract_list(self):
        """消息中心-合同消息-展示本金确认书合同列表"""

        # 客户登录并进入消息中心列表
        entry_page = Entry_page(self.driver)
        newspage = entry_page.open_news_page()

        # 点击合同列表页面
        contractspage = newspage.click_el_contract_message_btn()

        time.sleep(2)
        #获取列表中第 index 个的详情数据,默认最新的一条数据
        con_list=contractspage.get_Contracts_list_text(index=0)
       # print "con_list is %s" %con_list[0]
        #从DB中查询购买的最新的理财产品信息
        #sql=Exce_SQLserver()
       # results = sql.execSql_getList(
           # "SELECT top 1  new_product_name,new_investdate,new_name,new_financeterm from new_investdetailBase WHERE new_accountname = '24004F6C-7C08-E711-80C9-00155D01F903' order BY  new_investdate DESC")
        sql = Exce_SQLserver()
        product_name = sql.execSql_getList("SELECT top 1  new_product_name from new_investdetailBase WHERE new_accountname = '24004F6C-7C08-E711-80C9-00155D01F903' order BY  CreatedOn DESC")
        #print "product_name is %s" %product_name
        sql = Exce_SQLserver()
        contract_number = sql.execSql_getList("SELECT top 1  new_name from new_investdetailBase WHERE new_accountname = '24004F6C-7C08-E711-80C9-00155D01F903' order BY  CreatedOn DESC")
        #print "contract_number is %s" % contract_number

        #print con_list[2]
        #print  contract_number[0][0]

        #断言处理
        self.basepage = BasePage(self.driver)
        self.basepage.saveScreenshot('contract_list')
        self.assertIn(con_list[0],product_name[0][0])
        self.assertEqual(con_list[2],contract_number[0][0])

        """
Esempio n. 2
0
    def test_contract_details_no3(self):
        """消息中心-授权委托书-催收及诉讼验证"""
        entry_page = Entry_page(self.driver)
        newspage = entry_page.open_news_page()
        contractspage = newspage.click_el_contract_message_btn()
        contractdetailspage = contractspage.click_el_check_pact_btn()
        contractdetailspage.el_litigation_btn.click()

        title = contractdetailspage.el_capitalt_title.text
        entry_page.saveScreenshot("contract_details_no3")
        self.assertEquals("授权委托书-催收及诉讼", title)
Esempio n. 3
0
    def test_contract_details_no1(self):
        """消息中心-出借咨询与服务协议验证"""
        entry_page = Entry_page(self.driver)
        newspage = entry_page.open_news_page()
        contractspage = newspage.click_el_contract_message_btn()
        contractdetailspage=contractspage.click_el_check_pact_btn()
        contractdetailspage.el_service_agreement_btn.click()

        title = contractdetailspage.el_capitalt_title.text
        entry_page.saveScreenshot("contract_details_no2")

        self.assertEquals(title,"出借咨询与服务协议")
Esempio n. 4
0
    def test_consultation_mes(self):
        """消息中心-咨询消息-展示咨询消息列表"""

        # 客户登录并进入消息中心列表
        entry_page=Entry_page(self.driver)
        newspage=entry_page.open_news_page()

        # 点击合同列表页面
        newsconsultspage = newspage.click_el_consult_message_btn()

        newsconsultspage_title=newsconsultspage.el_service_agreement_title.text

        entry_page.saveScreenshot('consultation_mes')
        self.assertEqual(newsconsultspage_title,'咨询消息')
Esempio n. 5
0
    def test_newspage_contract(self):
        """消息中心-合同消息-本金确认书验证"""

        #客户登录并进入消息中心列表
        entry_page = Entry_page(self.driver)
        newspage = entry_page.open_news_page()
        #点击合同列表页面
        contractspage=newspage.click_el_contract_message_btn()
        #点击合同详情页
        contractdetailspage=contractspage.click_el_check_pact_btn()
        #点击出借本金确认书 el_capital_btn
        contractdetailspage.clcik_el_capital_btn()

        contractdetailspage.get_screenshot_by_element(contractdetailspage, 'el_capital_img',isexist=False)  #第一次截图时
        #进行截图对比
        time.sleep(4)
        bool1= contractdetailspage.get_screenshot_by_element(contractdetailspage,'el_capital_img',isexist=True).same_as(percent=30)
        #断言判断
        title=contractdetailspage.el_capitalt_title.text
        self.basepage = BasePage(self.driver)
        self.basepage.saveScreenshot('newspage_contract')
        self.assertTrue(bool1)
        self.assertEqual(title,'出借本金确认书')