*** Settings *** Suite Setup Import Variables ${CURDIR}\\DA_data.yaml Resource InfoResource.robot Resource ../Login/resource.robot Library Collections Library RequestsLibrary *** Test Cases *** WritebaseInfo Given 用户首次填写婚介资料 Then 选择婚介性别资料 And 选择婚介征婚人的城市 And 选择婚介征婚人的出生年份 And 选择婚介征婚人的身高 And 选择婚介征婚人的学历 And 选择婚介征婚人的婚姻状况 And 选择婚介征婚人的月收入 And 选择婚介征婚人的昵称 sex_info #选择性别 #Given 用户打开小程序 Given 选择婚介性别资料 #And 重新进入小程序 city_info #选择推荐城市 Given 用户打开小程序 Then 选择婚介证婚人的城市 And 返回上一步 And 重新进入小程序 age_info #选择出生年份 Given 用户打开小程序 Then 选择${dating}征婚人的出生年份 And 返回上一步 And 重新进入小程序 hight_info #选择身高 Given 用户打开小程序 Then 选择${dating}征婚人的身高 And 返回上一步 And 重新进入小程序 edu_info #选择学历 Given 用户打开小程序 Then 选择${dating}征婚人的学历 And 返回上一步 And 重新进入小程序 marry_info #选择婚姻状况 Given 用户打开小程序 Then 选择${dating}征婚人的婚姻状况 And 返回上一步 And 重新进入小程序 money_info #选择月收入 Given 用户打开小程序 Then 月收入 And 返回上一步 And 重新进入小程序 region Disable Warnings Create Session region http://qncloud.oss-cn-shenzhen.aliyuncs.com ${reps} GET On Session region address.json ${local_data} Get From Dictionary ${reps.json()} data FOR ${province} IN @{local_data} #省列表数据 ${provinceCode} Get From Dictionary ${province} value #获取省编码 ${provinceName} Get From Dictionary ${province} label #获取省名称 Exit For Loop If '${provinceName}'=='广东省' END ${city_data} Get From Dictionary ${province} children #广东省市列表数据 FOR ${city} IN @{city_data} ${cityCode} Get From Dictionary ${city} value #获取市编码 ${cityName} Get From Dictionary ${city} label #获取市名称 Exit For Loop If '${cityName}'=='广州市' END ${district_data} Get From Dictionary ${city} children #广州市列表数据 log ${district_data} ${district} Evaluate random.choice(${district_data}) random ${districtCode} Get From Dictionary ${district} value #随机获取广州市区编码 ${districtName} Get From Dictionary ${district} label #随机获取广州市区名称 Set Global Variable ${cityCode} Set Global Variable ${cityName} Set Global Variable ${districtCode} Set Global Variable ${districtName} Set Global Variable ${provinceCode} Set Global Variable ${provinceName} test 查询首次填写的婚介资料信息