You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
3.0 KiB
61 lines
3.0 KiB
*** Settings ***
|
|
Library urllib3
|
|
Library String
|
|
Library DateTime
|
|
Library Collections
|
|
Library RequestsLibrary
|
|
Library DatabaseLibrary
|
|
|
|
*** Keywords ***
|
|
扫描${dating}邀请绑定代理人二维码
|
|
#扫描邀请绑定代理人二维码
|
|
FOR ${client_header} IN @{Cheader_list}
|
|
Create Session dating ${${dating}.dating域名} ${client_header}
|
|
${reps} GET On Session dating dating-agency-uec/user/verify/qrcode params=mark=50325897884795883&qrCodeRecordId=1023654201504436224
|
|
${code} Get From Dictionary ${reps.json()} code
|
|
${orgId} Get From Dictionary ${reps.json()['data']['metaData']} orgId #运营中心组织id
|
|
END
|
|
Set Global Variable ${orgId}
|
|
|
|
用户绑定${dating}运营中心
|
|
#用户绑定运营中心
|
|
FOR ${client_header} IN @{Cheader_list}
|
|
Create Session dating ${${dating}.dating域名} ${client_header}
|
|
${data} Set Variable {"orgId":${orgId}}
|
|
${reps} POST On Session dating dating-agency-uec/user/bind/operation-center ${data.encode('utf-8')}
|
|
${message} Get From Dictionary ${reps.json()} message
|
|
Should Be Equal As Strings ${message} successful
|
|
END
|
|
|
|
邀请${dating}用户开店
|
|
#代理商邀请用户开店
|
|
FOR ${client_header} IN @{Cheader_list}
|
|
Create Session dating ${${dating}.dating域名} ${client_header}
|
|
|
|
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}
|