Browse Source

no message

master
LG_lai 2 years ago
parent
commit
d481e23da3
10 changed files with 180 additions and 2 deletions
  1. 1
      Login/Login.robot
  2. 11
      Login/LoginResource.robot
  3. 10
      Opr-Center-RF-Api/000Login/LoginCase.robot
  4. 37
      Opr-Center-RF-Api/000Login/LoginResource.robot
  5. 0
      Opr-Center-RF-Api/000Login/__init__.robot
  6. 17
      Opr-Center-RF-Api/000Login/login.yaml
  7. 14
      Opr-Center-RF-Api/000Login/新建 文本文档.txt
  8. 24
      WriteInfo/InfoResource.robot
  9. 66
      WriteInfo/Infomation.robot
  10. 2
      WriteInfo/__init__.robot

1
Login/Login.robot

@ -16,4 +16,5 @@ Plogin
WLogin
Given 用户打开小程序
Then 重新进入小程序
#Then 微信一键登录

11
Login/LoginResource.robot

@ -14,11 +14,18 @@ Library AppiumLibrary
Input Text xpath=//android.widget.EditText[@resource-id='com.tencent.mm:id/bxz'] 盒版拼拼 #文本框输入:盒版拼拼
Click Element xpath=//android.widget.TextView[@text='盒版拼拼'] #点击搜索的结果
sleep 1
Close Application
#Close Application
微信一键登录
用户打开小程序
输入手机号获取验证码
登录
重新进入小程序
#重新进入小程序
Click Element xpath=//android.widget.ImageButton[@content-desc='更多'] #点击“...”
sleep 1
Click Element xpath=//android.support.v7.widget.RecyclerView[@resource-id='com.tencent.mm:id/ab8']/android.widget.LinearLayout[4]/android.widget.RelativeLayout[1]/android.widget.ImageView[2] #重新进入小程序
sleep 1
Close Application

10
Opr-Center-RF-Api/000Login/LoginCase.robot

@ -0,0 +1,10 @@
*** Settings ***
Suite Setup Import Variables D:\\LYL\\Study\\Robot_framework\\space\\Opr-Center-RF-Api\\000Login\\login.yaml
Resource LoginResource.robot
*** Test Cases ***
WebLogin
[Template] ${user}手机验证码登录opr运营端并查看订单管理-蓝纸
用户1
用户2
用户3

37
Opr-Center-RF-Api/000Login/LoginResource.robot

@ -0,0 +1,37 @@
*** Settings ***
Library urllib3
Library String
Library Collections
Library RequestsLibrary
*** Keywords ***
用户${user}使用手机验证码登录${Web_site}运营端
#登录UEC
Disable Warnings
Create Session opr-center ${${Web_site}.UEC域名} ${${Web_site}.Header}
${Data} Set Variable { \ \ \ \ \ \ \ \ \ \ "account": \ "${${user}.手机号}", \ \ \ \ \ \ \ \ \ \ "accountType": \ 2, \ \ \ \ \ \ \ \ \ \ "captcha": \ "${${user}.验证码}" }
${reps} POST On Session opr-center uec/authorize/by-captcha ${Data.encode('utf-8')}
Sleep 1
${token} Get From Dictionary ${reps.json()['data']} token #获取UECtoken
${message} Get From Dictionary ${reps.json()} message #获取返回的message
Set Global Variable ${token}
#转换业务线token
Create Session opr-center ${${Web_site}.Client域名} ${${Web_site}.Header}
${LoginToken} Set Variable { \ \ \ \ \ \ \ \ \ \ "loginToken": \ "${token}" }
${reps} POST On Session opr-center cloud-print-user-center/authorize/get/product-line-token/by/login-token ${LoginToken.encode('utf-8')}
${Token} Get From Dictionary ${reps.json()} data
#${Login_Header} Set Variable {'Content-Type':'application/json','X-APP-ID':'503258978847966425','Authorization':'QNT ${Token}'}
${Base_Header} Set Variable {'Content-Type':'application/json','X-APP-ID':'503258978847966425','Authorization':'QNT ${Token}','X-Enterprise-Id':'723635193163943936','X-Factory-Id':'546450842056790018','X-Organization-Id':'723635193096835072'}
#Set Global Variable ${Login_Header}
Set Global Variable ${Base_Header}
#获取用户基本信息
#${reps} GET On Session opr-center yyt-uec/get/base-info
用户${user}查看${Web_site}订单管理-蓝纸列表
#用户查看订单管理页面
Create Session opr-center ${${Web_site}.Client域名} ${Base_Header}
${reps} GET On Session opr-center printing-packaging-factory-service/user/page/product/batch/sales params=status=4&pageNum=1&pageSize=10
${user}手机验证码登录opr运营端并查看订单管理-蓝纸
Given 用户${user}使用手机验证码登录opr运营端
Then 用户${user}查看opr订单管理-蓝纸列表

0
Opr-Center-RF-Api/000Login/__init__.robot

17
Opr-Center-RF-Api/000Login/login.yaml

@ -0,0 +1,17 @@
opr:
UEC域名: https://api-client-uec-test.qniao.cn
Client域名: https://api-client-yyt-test.qniao.cn
Header: {'Content-Type':'application/json','X-APP-ID':'503258978847966425'}
用户1:
手机号: 15014242835
验证码: 888888
用户2:
手机号: 19128859944
验证码: 888888
用户3:
手机号: 18814092561
验证码: 888888

14
Opr-Center-RF-Api/000Login/新建 文本文档.txt

@ -0,0 +1,14 @@
opr-center:
登录页URL: https://opr-center-test.qniao.cn/#/user/login
用户1:
手机号: 15014242835
验证码: 888888
用户2:
手机号: 15014242835
验证码: 666666
用户3:
手机号: 10000000000
验证码: 888888

24
WriteInfo/InfoResource.robot

@ -0,0 +1,24 @@
*** Settings ***
Library urllib3
Library String
Library Collections
Library RequestsLibrary
*** Keywords ***
性别
城市
出生年份
身高
学历
婚姻状况
月收入
昵称
返回上一步

66
WriteInfo/Infomation.robot

@ -0,0 +1,66 @@
*** Settings ***
Suite Setup Import Variables D:\LYL\Study\Robot_framework\space\Dating-agency\DA_data.yaml
Resource InfoResource.robot
Resource ../Login/LoginResource.robot
Library Collections
Library RequestsLibrary
*** Test Cases ***
Info
Given 用户打开小程序
Then 性别
And 城市
And 出生年份
And 身高
And 学历
And 婚姻状况
And 月收入
And 昵称
sex_info
#选择性别
Given 用户打开小程序
Then 性别
And 重新进入小程序
city_info
#选择推荐城市
Given 用户打开小程序
Then 城市
And 返回上一步
And 重新进入小程序
age_info
#选择出生年份
Given 用户打开小程序
Then 出生年份
And 返回上一步
And 重新进入小程序
hight_info
#选择身高
Given 用户打开小程序
Then 身高
And 返回上一步
And 重新进入小程序
edu_info
#选择学历
Given 用户打开小程序
Then 学历
And 返回上一步
And 重新进入小程序
marry_info
#选择婚姻状况
Given 用户打开小程序
Then 婚姻状况
And 返回上一步
And 重新进入小程序
money_info
#选择月收入
Given 用户打开小程序
Then 月收入
And 返回上一步
And 重新进入小程序

2
WriteInfo/__init__.robot

@ -0,0 +1,2 @@
*** Settings ***
Suite Setup
Loading…
Cancel
Save