def __init__(self, casepath, logpath, picpath, apppath, timestap,
                 driverkey):
        self.x = casepath
        self.y = logpath
        self.z = timestap
        self.m = picpath
        self.n = apppath
        self.driver = driverkey

        #desired_caps['appPackage'] = 'com.rjs.ddjr'
        #desired_caps['appActivity'] = 'com.rjs.ddjr.publicmodel.view.LoginActivity'

        # 评审修改时间2017/5/4
        #路径需要使用相对路径,避免绝对路径

        # 进行登录操作
        print(
            "——————————————————————————————即将进行用户登录操作——————————————————————————————————"
        )

        self.driver.start_activity(
            'com.rjs.ddjr', 'com.rjs.ddjr.publicmodel.view.LoginActivity')
        self.driver.implicitly_wait(1000)

        # 评审修改时间2017/5/4
        #case执行和代码开发过程中试用关键字驱动Auto_mlrc_login_001,同时获取用例data
        paramstr = excle.excels(self.x, 'Auto_mlrc_login_001',
                                "").searche_parameter_excel()
        print(paramstr)

        # 评审修改时间2017/5/4
        #如果存在参数,需要根据
        self.name = commons._str_chuli_(paramstr, ',')[0]
        self.passwd = commons._str_chuli_(paramstr, ',')[1]
    def __init__(self,casepath,logpath,picpath,apppath,timestap,driver):
        self.x = casepath
        self.y = logpath
        self.z = timestap
        self.m = picpath
        self.n = apppath
        self.driver = driver
        print(self.n)

        # 这段代码多余
        # XiangfaLogin(self.x, self.y, self.m, self.n, self.z,self.driver).login()

        #路径需要使用相对路径,避免绝对路径
        print("——————————————————————————————打开个人信息页面,开始录单————————————————————————")
        self.driver.start_activity("com.rjs.ddjr", "com.rjs.ddjr.cheyidai.draft.view.PersonalInfoActivity")
        self.driver.implicitly_wait(15)

        # case执行和代码开发过程中试用关键字驱动Auto_mlrc_Personinfo_002,同时获取用例data
        paramstr = str(excle.excels(self.x, 'Auto_mlrc_Personinfo_002', "").searche_parameter_excel())
        print(paramstr)

        # 如果存在参数,需要根据
        self.loan_money = commons._str_chuli_(paramstr, ',')[0]
        self.person_name = commons._str_chuli_(paramstr, ',')[1]
        self.person_age = commons._str_chuli_(paramstr, ',')[2]
        # self.identification_number = commons._str_chuli_(paramstr, ',')[3]
        self.et_addr = commons._str_chuli_(paramstr, ',')[3]
        self.person_phone = commons._str_chuli_(paramstr, ',')[4]
        self.phone_number_service_password = commons._str_chuli_(paramstr, ',')[5]
        self.home_phone = commons._str_chuli_(paramstr, ',')[6]
        self.mail_address = commons._str_chuli_(paramstr, ',')[7]
        self.qq_number = commons._str_chuli_(paramstr, ',')[8]
    def __init__(self, casepath, logpath, picpath, apppath, timestap, driver):
        self.x = casepath
        self.y = logpath
        self.z = timestap
        self.m = picpath
        self.n = apppath
        self.driver = driver
        print(self.n)

        # case执行和代码开发过程中试用关键字驱动 Auto_mlrc_IncomeInfo_005,同时获取用例data
        paramstr = str(
            excle.excels(self.x, 'Auto_mlrc_IncomeInfo_005',
                         "").searche_parameter_excel())
        print(paramstr)

        # # 如果存在参数,需要进行参数化
        self.income_source = commons._str_chuli_(paramstr, ',')[0]
        self.monthly_income = commons._str_chuli_(paramstr, ',')[1]
    def __init__(self, casepath, logpath, picpath, apppath, timestap, driver):
        self.x = casepath
        self.y = logpath
        self.z = timestap
        self.m = picpath
        self.n = apppath
        self.driver = driver
        print(self.n)

        # case执行和代码开发过程中试用关键字驱动 Auto_mlrc_EnterpriseInfo_008,同时获取用例data
        paramstr = str(
            excle.excels(self.x, 'Auto_mlrc_EnterpriseInfo_008',
                         "").searche_parameter_excel())
        print(paramstr)

        # 如果存在参数,需要根据参数传值
        self.enterprise_name = commons._str_chuli_(paramstr, ',')[0]
        self.et_addr = commons._str_chuli_(paramstr, ',')[1]
        self.monthly_turnover = commons._str_chuli_(paramstr, ',')[2]
        self.enterprise_phone = commons._str_chuli_(paramstr, ',')[3]
    def __init__(self, casepath, logpath, picpath, apppath, timestap, driver):
        self.x = casepath
        self.y = logpath
        self.z = timestap
        self.m = picpath
        self.n = apppath
        self.driver = driver
        print(self.n)

        # case执行和代码开发过程中试用关键字驱动 Auto_mlrc_RelativiesInfo_006,同时获取用例data
        paramstr = str(
            excle.excels(self.x, 'Auto_mlrc_RelativiesInfo_006',
                         "").searche_parameter_excel())
        print(paramstr)

        # # 如果存在参数,需要根据
        self.relatives_name = commons._str_chuli_(paramstr, ',')[0]
        self.relatives_phone = commons._str_chuli_(paramstr, ',')[1]
        self.work_unit = commons._str_chuli_(paramstr, ',')[2]
        self.et_info = commons._str_chuli_(paramstr, ',')[3]
Exemple #6
0
    def __init__(self, casepath, logpath, picpath, apppath, timestap, driver):
        self.x = casepath
        self.y = logpath
        self.z = timestap
        self.m = picpath
        self.n = apppath
        self.driver = driver
        print(self.n)

        # case执行和代码开发过程中试用关键字驱动Auto_mlrc_VehicleInfo_004,同时获取用例data
        paramstr = str(
            excle.excels(self.x, 'Auto_mlrc_VehicleInfo_004',
                         "").searche_parameter_excel())
        print(paramstr)

        # # 如果存在参数,需要根据
        # self.license_plate = commons._str_chuli_(paramstr, ',')[0]
        self.vehicle_identification_code = commons._str_chuli_(paramstr,
                                                               ',')[0]
        self.engine_number = commons._str_chuli_(paramstr, ',')[1]
        self.vehicle_type = commons._str_chuli_(paramstr, ',')[2]
        self.purchase_price = commons._str_chuli_(paramstr, ',')[3]
        self.mortgage_number = commons._str_chuli_(paramstr, ',')[4]