Files
httprunner/examples/uitest/demo_douyin_follow_live.yaml
T

84 lines
2.1 KiB
YAML

config:
name: 通过 关注天窗 进入指定主播抖音直播间
variables:
app_name: 抖音
ios:
- port: 8700
mjpeg_port: 8800
log_on: true
teststeps:
- name: 启动抖音
ios:
actions:
- method: home
- method: app_terminate
params: com.ss.iphone.ugc.Aweme
- method: swipe_to_tap_app
params: $app_name
identifier: 启动抖音
max_retry_times: 5
- method: sleep
params: 5
validate:
- check: ui_ocr
assert: exists
expect: 推荐
msg: 抖音启动失败,「推荐」不存在
- name: 处理青少年弹窗
ios:
actions:
- method: tap_ocr
params: 我知道了
ignore_NotFoundError: true
- name: 点击首页
ios:
actions:
- method: tap_ocr
params: 首页
index: -1
- method: sleep
params: 10
- name: 点击关注页
ios:
actions:
- method: tap_ocr
params: 关注
index: 1
- method: sleep
params: 10
- name: 向上滑动 2 次
ios:
actions:
- method: swipe_to_tap_texts
params:
- 理肤泉
- 婉宝
identifier: click_live
direction:
- 0.6
- 0.2
- 0.2
- 0.2
- method: sleep
params: 10
- method: swipe
params:
- 0.9
- 0.7
- 0.9
- 0.3
identifier: slide_in_live
- method: sleep
params: 10
- method: screenshot
- method: swipe
params:
- 0.9
- 0.7
- 0.9
- 0.3
identifier: slide_in_live
- method: sleep
params: 10
- method: screenshot