예제 #1
0
파일: kezhan.py 프로젝트: qinying/test
 def gerne_shuju(self):
     shu = shuju()
     shu.personal()
     conn = MySQLdb.connect(
         host='121.40.237.1',
         port=3317,
         user='******',
         passwd='Order!1',
         db='order',
         charset="utf8",
     )
     cursor = conn.cursor()
     t = str(orderid)
     cursor.execute("SELECT * FROM ORDER_INFO WHERE USER_ORDER_ID = '%s'" %
                    t)
     cursor.fetchone()
     a = cursor._rows
     o = a[0]
     orderid_id = o[0]
     print orderid_id
     d = MySQLdb.connect(
         host='121.40.237.1',
         port=3317,
         user='******',
         passwd='New_operate_test!1',
         db='new_operate',
         charset="utf8",
     )
     mysql = d.cursor()
     mysql.execute("SELECT * FROM WORKFLOW_CHECK_ORDER ")
     mysql.execute(
         "UPDATE WORKFLOW_CHECK_ORDER t SET t.STATUS_ID=1 WHERE t.CUSTOMERINFO_ID='%s'"
         % orderid_id)
     mysql.execute("COMMIT;")
예제 #2
0
파일: kezhan.py 프로젝트: qinying/test
    def contract(self):
        driver.refresh()
        #合同领取
        driver.find_element_by_xpath(
            '//*[@id="body"]/div/div[2]/div/div[1]/div/div/div[2]/div[3]/div/ul/li[4]/a'
        ).click()
        driver.find_element_by_xpath(
            '//*[@id="body"]/div/div[2]/div/div[1]/div/div/div[2]/div[3]/div/div/div/div/div[1]/table/tbody/tr/td[9]/a[2]/i'
        ).click()
        time.sleep(2)

        #合同类型(有无保证金)
        Select(
            driver.find_element_by_xpath(
                '//*[@id="body"]/div/div[2]/div/div[1]/div/div[2]/div[2]/div[3]/div/div[3]/div[1]/div/select'
            )).select_by_value('string:2')
        time.sleep(2)

        #利率类型
        Select(
            driver.find_element_by_xpath(
                '//*[@id="body"]/div/div[2]/div/div[1]/div/div[2]/div[2]/div[3]/div/div[3]/div[2]/div/select'
            )).select_by_value('string:1')
        time.sleep(2)

        #产品类型
        Select(
            driver.find_element_by_xpath(
                '//*[@id="body"]/div/div[2]/div/div[1]/div/div[2]/div[2]/div[3]/div/div[3]/div[3]/div/select'
            )).select_by_value('string:RA201604120000003')
        time.sleep(1)

        #合同类型
        Select(
            driver.find_element_by_xpath(
                '//*[@id="body"]/div/div[2]/div/div[1]/div/div[2]/div[2]/div[3]/div/div[3]/div[4]/div/select'
            )).select_by_value('string:1')
        driver.find_element_by_xpath(
            '//*[@id="body"]/div/div[2]/div/div[1]/div/div[2]/div[2]/div[3]/div/div[2]/span'
        ).click()
        time.sleep(20)
        driver.find_element_by_xpath(
            '//*[@id="body"]/div/div[2]/div/div[1]/div/div[2]/div[3]/div/div/div/div/div/div[2]/button[1]'
        ).click()
        time.sleep(20)

        driver.get_screenshot_as_file(
            '/Users/qinying/PycharmProjects/rongcapital/test/img/Error.png')
        #协议上传
        shu = shuju()
        shu.ke_Agr()
예제 #3
0
파일: fangcang.py 프로젝트: qinying/test
#-*- coding: UTF-8 -*-
from selenium.webdriver.support.select import Select
from login import Login
import time
import HTMLTestRunner
import unittest
from help_students import shuju

import sys
reload(sys)
sys.setdefaultencoding('utf8')

shu = shuju()
shu.fang_Cart()
index = Login()
driver = index.admin()


class fang(unittest.TestCase):
    def Credit(self):
        driver.find_element_by_xpath(
            '//*[@id="body"]/div/div[2]/div/div/div/div/div/div[1]/div[2]/div[3]/div/div'
        ).click()
        time.sleep(2)
        driver.find_element_by_xpath(
            '//*[@id="body"]/div/div[2]/div/div/div/div/div/div[2]/button'
        ).click()
        time.sleep(2)
        Select(
            driver.find_element_by_xpath(
                '//*[@id="body"]/div/div[1]/header/div/div[1]/div[2]/select')
예제 #4
0
 def xieyi(self):
     shu = shuju()
     shu.mrxieyi()
예제 #5
0
파일: kezhan.py 프로젝트: qinying/test
 def xieyi(self):
     shu = shuju()
     shu.ke_individual()
예제 #6
0
파일: kezhan.py 프로젝트: qinying/test
from selenium.webdriver.support.select import Select
import time
import traceback
import paramiko
import MySQLdb
import HTMLTestRunner
import unittest
from login import Login
from help_students import shuju, orderid

import sys
reload(sys)
sys.setdefaultencoding('utf8')

#窗口最大化
word = shuju()
word.open_kezhan()
dri = Login()
driver = dri.admin()


#登陆
class test_index(unittest.TestCase):

    #贷款管理
    def credit_Shenpin(self):
        driver.find_element_by_xpath(
            '//*[@id="body"]/div/div[2]/div/div/div/div/div/div[1]/div[2]/div[3]/div/div'
        ).click()
        time.sleep(2)
        driver.find_element_by_xpath(