diff --git a/0-Login/Login-interface.robot b/0-Login/Login-interface.robot
index 67e1b28..3397df4 100644
--- a/0-Login/Login-interface.robot
+++ b/0-Login/Login-interface.robot
@@ -7,6 +7,7 @@ Library Collections
Library JSONLibrary
Library OperatingSystem
Library ImageHorizonLibrary
+Library RedisLibrary
*** Variables ***
@@ -138,4 +139,9 @@ Library ImageHorizonLibrary
#${IdType} Evaluate type(${Id})
#${Id} Convert To String ${IdType}
#随机取数字
- ${activityType} Evaluate "".join(random.sample("01",1)) random,string
+ #${activityType} Evaluate "".join(random.sample("01",1)) random,string
+ #连接Redis
+ #${redis_conn}= Connect To Redis 8.135.8.221 6379 2 qnredis
+ #身份证64位加密
+ #${filepath1} Set Variable D:/LYL/图片/20210805134405.jpg
+ #${frontImg} Evaluate base64.b64encode(open('${filepath1}','rb').read()).decode('utf-8') base64
diff --git a/0-Login/LoginResource.robot b/0-Login/LoginResource.robot
index f0e6454..2eafc67 100644
--- a/0-Login/LoginResource.robot
+++ b/0-Login/LoginResource.robot
@@ -21,7 +21,6 @@ Library ImageHorizonLibrary
Set Global Variable ${id}
生成随机手机号
- ${phoneList} Create List
${phoneList} Create List
${num} Evaluate random.choice(["139","188","185","136","158","151","132","156","189","187","135","134"]) random
${number} Evaluate "".join(random.sample("01234567897",8)) random,string
@@ -126,7 +125,8 @@ Library ImageHorizonLibrary
${message} Get From Dictionary ${reps.json()} message
${login_header} Set Variable {'Content-Type':'application/json','X-APP-ID':'50325897884795881','Authorization':'QNT ${token}','X-Organization-Id':'963432943739605555'} #更新header
log ${login_header}
- ${client_header} Set Variable {'Content-Type':'application/json','X-APP-ID':'50325897884795880','Authorization':'QNT ${token}'}
+ #${client_header} Set Variable {'Content-Type':'application/json','X-APP-ID':'50325897884795880','Authorization':'QNT ${token}'} #趣招亲小程序
+ ${client_header} Set Variable {'Content-Type':'application/json','X-APP-ID':'50325897884795883','Authorization':'QNT ${token}'} #招亲宝小程序
Append To List ${userid_list} ${userId}
Append To List ${Cheader_list} ${client_header}
Append To List ${Aheader_list} ${login_header}
@@ -156,7 +156,8 @@ Library ImageHorizonLibrary
${userId} Get From Dictionary ${reps.json()['data']} userId #获取用户id
${message} Get From Dictionary ${reps.json()} message
${login_header} Set Variable {'Content-Type':'application/json','X-APP-ID':'50325897884795881','Authorization':'QNT ${token}','X-Organization-Id':'963432943739605555'} #更新header
- ${client_header} Set Variable {'Content-Type':'application/json','X-APP-ID':'50325897884795880','Authorization':'QNT ${token}'}
+ ${client_header} Set Variable {'Content-Type':'application/json','X-APP-ID':'50325897884795880','Authorization':'QNT ${token}'} #趣招亲小程序
+ #${client_header} Set Variable {'Content-Type':'application/json','X-APP-ID':'50325897884795883','Authorization':'QNT ${token}'} #招亲宝小程序
Append To List ${userid_list} ${userId}
Append To List ${Cheader_list} ${client_header}
Append To List ${Aheader_list} ${login_header}
diff --git a/1-Applet/2-Homepage/MarriageInfo/Authentication.robot b/1-Applet/2-Homepage/MarriageInfo/Authentication.robot
index d2dfe02..8a705eb 100644
--- a/1-Applet/2-Homepage/MarriageInfo/Authentication.robot
+++ b/1-Applet/2-Homepage/MarriageInfo/Authentication.robot
@@ -96,9 +96,9 @@ Resource ../../../0-Login/LoginResource.robot
#提交征婚人身份证审核
#${value_list} Create List 李博,429006198410300956 王颖勋,44058319951227041X 就是不吃饭,441481199509213863 王颖勋,4400 李子懿,429006201701270931
#女生身份证
- ${womanvalue_list} Set Variable ["赖勇兰,441481199509213863","赖敏怡,441521199410142320","刘景梅,371525198608012364","黄丽馨,441302199511296927","刘惠琼,441827198807146821","黄丽馨,441302199511296927"]
+ ${womanvalue_list} Set Variable ["赖勇兰,441481199509213863","赖敏怡,441521199410142320","刘景梅,371525198608012364","刘惠琼,441827198807146821","黄丽馨,441302199511296927"]
#男生身份证
- ${manvalue_list} Set Variable ["张山,522328199807132811","臧琨,654001198103171417","李博,429006198410300956","王颖勋,44058319951227041X","刘文波,430426198402075198","董帅,411425199011117552","江志诚,43042619970207049X","杨仁丰,440923199311122678","陈越,445122199210152055","刘虎跃,43042619891011515X","李雷刚,430426198502033497","邝绍荣,440105198310224217","全拥军,430426197806302591"]
+ ${manvalue_list} Set Variable ["张山,522328199807132811","臧琨,654001198103171417","李博,429006198410300956","王颖勋,44058319951227041X","刘文波,430426198402075198","董帅,411425199011117552","江志诚,43042619970207049X","杨仁丰,440923199311122678","陈越,445122199210152055","刘虎跃,43042619891011515X","李雷刚,430426198502033497","邝绍荣,440105198310224217","全拥军,430426197806302591","陈毅,441625199012125016","梁伟欣,440783199609292114"]
${code} Evaluate 0
FOR ${miId} ${client_header} IN ZIP ${miId_list} ${Cheader_list}
Create Session dating ${${dating}.dating域名} ${client_header}
diff --git a/2-Web/OperationCenter/Operation.robot b/2-Web/OperationCenter/Operation.robot
new file mode 100644
index 0000000..5613793
--- /dev/null
+++ b/2-Web/OperationCenter/Operation.robot
@@ -0,0 +1,11 @@
+*** Settings ***
+Suite Setup Import Variables ${EXECDIR}\\DA_data.yaml
+Resource OperationResources.robot
+
+*** Test Cases ***
+创建一级代理商组织
+ Given 创建婚介一级代理商
+ Then 查询婚介一级代理列表
+
+邀请绑定代理人
+ Given 扫描婚介邀请绑定代理人二维码
diff --git a/2-Web/OperationCenter/OperationResources.robot b/2-Web/OperationCenter/OperationResources.robot
new file mode 100644
index 0000000..4ebf23a
--- /dev/null
+++ b/2-Web/OperationCenter/OperationResources.robot
@@ -0,0 +1,55 @@
+*** Settings ***
+Library urllib3
+Library String
+Library DateTime
+Library Collections
+Library RequestsLibrary
+Library DatabaseLibrary
+
+*** Keywords ***
+创建${dating}一级代理商
+ #创建一级代理商
+ FOR ${admin_header} IN @{Aheader_list}
+ ${DateTime} Get Current Date result_format=%Y-%m-%d #获取当天日期
+ Create Session dating ${${dating}.dating域名} ${admin_header}
+ ${orgName} Set Variable 婚恋一级代理商${DateTime}
+ ${franchiseFee} Evaluate random.randrange(50000,100000,1000) random #获取随机正整数
+ ${administratorName} Set Variable 代理商${DateTime}
+ ${data} Set Variable {"orgName":"${orgName}","administratorName":"${administratorName}","franchiseFee":${franchiseFee}}
+ ${reps} POST On Session dating dating-agency-uec/user/create/operation-center ${data.encode('utf-8')}
+ ${message} Get From Dictionary ${reps.json()} message #接口响应信息
+ Should Be Equal As Strings ${message} successful #断言字段是否相同
+ END
+ Set Global Variable ${orgName}
+ Set Global Variable ${administratorName}
+
+查询${dating}一级代理列表
+ #查询一级代理列表
+ FOR ${admin_header} IN @{Aheader_list}
+ Create Session dating ${${dating}.dating域名} ${admin_header}
+ ${reps} GET On Session dating dating-agency-uec/user/page/operation-center params=pageSize=10&pageNum=1
+ ${records} Get From Dictionary ${reps.json()['data']} records #一级代理商列表
+ Set Global Variable ${records}
+ 遍历一级代理商列表
+ END
+
+遍历一级代理商列表
+ FOR ${data} IN @{records}
+ ${Id} Get From Dictionary ${data} id #一级代理商id
+ ${OrgId} Get From Dictionary ${data} orgId #一级代理商组织id
+ ${ORGName} Get From Dictionary ${data} orgName #代理商组织name
+ ${AdministratorName} Get From Dictionary ${data} administratorName #代理人姓名
+ Exit For Loop If '${ORGName}'=='${orgName}'
+ Set Global Variable ${Id}
+ Set Global Variable ${OrgId}
+ Set Global Variable ${ORGName}
+ Set Global Variable ${AdministratorName}
+ END
+
+扫描${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=&qrCodeRecordId=1023330401797672960
+ ${code} Get From Dictionary ${reps.json()} code
+ END
diff --git a/2-Web/OperationCenter/__init__.robot b/2-Web/OperationCenter/__init__.robot
new file mode 100644
index 0000000..213963c
--- /dev/null
+++ b/2-Web/OperationCenter/__init__.robot
@@ -0,0 +1,2 @@
+*** Settings ***
+Documentation 分销代理
diff --git a/2-Web/SiteActivity/SiteActivityResources.robot b/2-Web/SiteActivity/SiteActivityResources.robot
index b0c2ac0..3dcb031 100644
--- a/2-Web/SiteActivity/SiteActivityResources.robot
+++ b/2-Web/SiteActivity/SiteActivityResources.robot
@@ -71,26 +71,28 @@ Library DatabaseLibrary
${reps} GET On Session dating dating-agency-mall/user/page/product/by/operator params=pageSize=100&enable=true&pageNum=1
${records} Get From Dictionary ${reps.json()['data']} records #商品数组
Set Global Variable ${records}
- ${productData} Evaluate random.choice(${records}) random #随机获取商品定价
- ${productId} Get From Dictionary ${productData} productId #商品id
- ${productSpecUnit} Get From Dictionary ${productData} productSpecUnit #商品规格分类
- Set Global Variable ${productId}
- Set Global Variable ${productSpecUnit}
+ 遍历商品列表
+ #${productData} Evaluate random.choice(${records}) random #随机获取商品定价
+ #${productId} Get From Dictionary ${productData} productId #商品id
+ #${productSpecUnit} Get From Dictionary ${productData} productSpecUnit #商品规格分类
+ #Set Global Variable ${productId}
+ #Set Global Variable ${productSpecUnit}
END
遍历商品列表
FOR ${product} IN @{records}
${status} Get From Dictionary ${product} status #商品状态
- ${productId} Get From Dictionary ${product} productId #商品id
- ${productTitle} Get From Dictionary ${product} productTitle #商品标题
+ ${vipActivityId} Get From Dictionary ${product} productId #商品id
+ ${goodsName} Get From Dictionary ${product} productTitle #商品标题
${productSpecId} Get From Dictionary ${product} productSpecId #商品规格id
${productSpecUnit} Get From Dictionary ${product} productSpecUnit #商品规格分类
- Set Global Variable ${status}
- Set Global Variable ${productId}
- Set Global Variable ${productTitle}
- Set Global Variable ${productSpecId}
- Set Global Variable ${productSpecUnit}
+ Exit For Loop If ${vipActivityId}==${productId}
END
+ Set Global Variable ${status}
+ Set Global Variable ${goodsName}
+ Set Global Variable ${vipActivityId}
+ Set Global Variable ${productSpecId}
+ Set Global Variable ${productSpecUnit}
查询${dating}平台会员活动
#查询会员活动
@@ -105,12 +107,14 @@ Library DatabaseLibrary
遍历会员活动列表
FOR ${activity} IN @{records}
${status} Get From Dictionary ${activity} status #会员活动状态
- ${activityId} Get From Dictionary ${activity} id #会员活动id
+ ${goodsName} Get From Dictionary ${activity} activityName #会员活动名称
${activeState} Get From Dictionary ${activity} activeState #会员活动启停
- Exit For Loop If ${activityId}==978382562932166656 and ${status}==1 and ${activeState}==1
+ ${vipActivityId} Get From Dictionary ${activity} id #会员活动id
+ Exit For Loop If ${vipActivityId}==${activityId} and ${status}==1 and ${activeState}==1
END
- Set Global Variable ${activityId}
+ Set Global Variable ${goodsName}
Set Global Variable ${activeState}
+ Set Global Variable ${vipActivityId}
获取${dating}收费项
#获取收费项
@@ -121,8 +125,9 @@ Library DatabaseLibrary
${reps} GET On Session dating dating-agency-mall/user/page/product/by/operator params=pageSize=100&enable=true&activeState=1&pageNum=1
${records} Get From Dictionary ${reps.json()['data']} records #商品定价列表
${productData} Evaluate random.choice(${records}) random #随机获取商品
- ${productId} Get From Dictionary ${productData} productId #商品名称
+ ${productId} Get From Dictionary ${productData} productId #商品id
${productTitle} Get From Dictionary ${productData} productTitle #商品名称
+ Set Global Variable ${productId}
Append To List ${goodsName_list} ${productTitle}
Append To List ${vipActivityId_list} ${productId}
${reps} GET On Session dating dating-agency-mall/user/get/activity/by/operator/page params=pageSize=100&enable=true&activeState=1&pageNum=1
@@ -130,12 +135,13 @@ Library DatabaseLibrary
${memberData} Evaluate random.choice(${records}) random #随机获取会员收费信息
${activityId} Get From Dictionary ${memberData} id #会员活动id
${activityName} Get From Dictionary ${memberData} activityName #会员活动name
+ Set Global Variable ${activityId}
Append To List ${goodsName_list} ${activityName}
Append To List ${vipActivityId_list} ${activityId}
- ${goodsName} Evaluate random.choice(${goodsName_list}) random #随机获取收费项name
+ #${goodsName} Evaluate random.choice(${goodsName_list}) random #随机获取收费项name
${vipActivityId} Evaluate random.choice(${vipActivityId_list}) random #随机获取收费项id
- Set Global Variable ${goodsName}
- Set Global Variable ${vipActivityId}
+ Run Keyword If ${vipActivityId}==${productId} 查询婚介平台商品定价列表
+ ... ELSE 查询婚介平台会员活动
END
创建${dating}平台活动
diff --git a/LoginUI/Login.robot b/LoginUI/Login.robot
index be7f40e..63ca238 100644
--- a/LoginUI/Login.robot
+++ b/LoginUI/Login.robot
@@ -20,4 +20,4 @@ open
趣招亲小程序
Given 小程序UI自动化-登录
- #用户打开小程序
+ #小程序UI自动化-首次填写资料
diff --git a/LoginUI/LoginResource.robot b/LoginUI/LoginResource.robot
index a0ff4c5..c90d9c3 100644
--- a/LoginUI/LoginResource.robot
+++ b/LoginUI/LoginResource.robot
@@ -66,14 +66,41 @@ Library String
Swipe ${X1} ${Y1} ${X1} ${Y2} #模拟下拉操作
Wait Until Page Contains 趣招亲 3 #等待页面出现指定的文本
Click Element xpath=//android.widget.RelativeLayout[@content-desc=\"趣招亲,\"]/android.widget.RelativeLayout[1]/android.widget.RelativeLayout[1]/android.widget.ImageView[1] #点击“趣招亲”小程序
+ #BuiltIn.Sleep 2
+ #Click Element xpath=//*[@text="我的"] #进入小程序后点击"我的"
BuiltIn.Sleep 1
- Click Element xpath=//*[@text="我的"] #进入小程序后点击"我的"
- BuiltIn.Sleep 1
- Click Element xpath=//android.view.View[@text=\"微信用户\"] #登录趣招亲
+ Wait Until Page Contains 微信用户 3
+ Click Element xpath=//*[@text="微信用户"] #登录趣招亲
Wait Until Page Contains 一键登录 3 #等待页面出现指定的文本
Click Element xpath=//*[@text="我已阅读并同意"] #勾选协议
Click Element xpath=//*[@text="一键登录"] #一键登录
- Click Element xpath=//android.view.View/android.view.View[4] #确认手机号登录
+ BuiltIn.Sleep 2
+ Click Element xpath=//*[@text="180****4975"] #确认手机号登录
+ Wait Until Page Contains 关系 3 #等待页面出现指定的文本
+ Click Element xpath=//*[@text="亲友"] #填写资料身份
+ Wait Until Page Contains 性别 3 #等待页面出现指定的文本
+ Click Element xpath=//android.view.View/android.view.View[5]/android.widget.Image[1] #填写性别
+ Wait Until Page Contains 城市 3 #等待页面出现指定的文本
+ Click Element xpath=//*[@text="继续"] #填写户口所在地
+ Click Element xpath=//*[@text="继续"] #填写家乡
+ Click Element xpath=//*[@text="1989"] #出生年份
+ Click Element xpath=//*[@text="172"] #身高
+ Click Element xpath=//*[@text="大学本科"] #学历
+ Click Element xpath=//*[@text="12001~20000"] #工资范围
+ #Click Element xpath=//*[@text="给自己取个好听的昵称吧"] #填写昵称
+ Input Value xpath=//*[@text="给自己取个好听的昵称吧"] 高价回收废纸王小 #填写昵称
+ Click Element xpath=//*[@text="开启招亲"]
#Wait Until Page Contains 立即完善 3 #等待页面出现指定的文本
#Click Element xpath=//android.webkit.WebView/android.view.View[2]/android.view.View[1] #立即完善资料
Close Application
+
+小程序UI自动化-首次填写资料
+ #小程序UI自动化-首次填写资料
+ Open Application http://127.0.0.1:4723/wd/hub platformName=Android platformVersion=9 deviceName=emulator-5554 automationName=uiautomator2
+ BuiltIn.Sleep 2
+ Click Element xpath=//android.view.View/android.view.View[2]/android.widget.Image[2] #点击"Hi"
+ Wait Until Page Contains 一键登录 3 #等待页面出现指定的文本
+ Click Element xpath=//*[@text="我已阅读并同意"] #勾选协议
+ Click Element xpath=//*[@text="一键登录"] #一键登录
+ Click Element xpath=//android.view.View/android.view.View[4] #确认手机号登录
+ Close Application
diff --git a/Phone.txt b/Phone.txt
index 1eff7f6..641785e 100644
--- a/Phone.txt
+++ b/Phone.txt
@@ -33,7 +33,6 @@
18024004975,888888
13217206974,888888
18871043759,888888
-18024004975,888888
18772953460,888888
18814092560,888888
13629763475,888888
@@ -63,7 +62,6 @@
13247780613,888888
18838942675,888888
13272765319,888888
-18024004975,888888
19128647726,888888
13243759268,888888
13577546190,888888
@@ -134,3 +132,7 @@
18996173270,888888
18539584026,888888
15873907256,888888
+18937742896,888888
+13229786174,888888
+13978591607,888888
+13597054183,888888
diff --git a/output/log.html b/output/log.html
index 7438d29..dc60c2a 100644
--- a/output/log.html
+++ b/output/log.html
@@ -1806,25 +1806,25 @@ function stopPropagation(event) {
window.output = {};