feat: get wda logs

This commit is contained in:
debugtalk
2022-09-22 21:11:38 +08:00
parent 9004f84791
commit 35225d97ff
17 changed files with 201 additions and 60 deletions

View File

@@ -1,6 +1,13 @@
{
"config": {
"name": "通过 feed 卡片进入微信直播间"
"name": "通过 feed 卡片进入微信直播间",
"ios": [
{
"port": 8700,
"mjpeg_port": 8800,
"log_on": true
}
]
},
"teststeps": [
{
@@ -40,7 +47,8 @@
},
{
"method": "tap_ocr",
"params": "视频号"
"params": "视频号",
"identifier": "进入视频号"
}
]
}

View File

@@ -1,5 +1,9 @@
config:
name: 通过 feed 卡片进入微信直播间
ios:
- port: 8700
mjpeg_port: 8800
log_on: true
teststeps:
- name: 启动微信
ios:
@@ -22,6 +26,7 @@ teststeps:
params: 发现
- method: tap_ocr
params: 视频号
identifier: 进入视频号
- name: 处理青少年弹窗
ios:
actions:

View File

@@ -9,7 +9,8 @@ import (
func TestIOSWeixinLive(t *testing.T) {
testCase := &hrp.TestCase{
Config: hrp.NewConfig("通过 feed 卡片进入微信直播间"), // .SetIOS(hrp.WDADevice{Port: 8700, MjpegPort: 8800})
Config: hrp.NewConfig("通过 feed 卡片进入微信直播间").
SetIOS(hrp.WithLogOn(true), hrp.WithPort(8700), hrp.WithMjpegPort(8800)),
TestSteps: []hrp.IStep{
hrp.NewStep("启动微信").
IOS().
@@ -20,8 +21,8 @@ func TestIOSWeixinLive(t *testing.T) {
AssertLabelExists("通讯录", "微信启动失败,「通讯录」不存在"),
hrp.NewStep("进入直播页").
IOS().
Tap("发现"). // 进入「发现页」
TapByOCR("视频号"), // 通过 OCR 识别「视频号」
Tap("发现"). // 进入「发现页」
TapByOCR("视频号", hrp.WithIdentifier("进入视频号")), // 通过 OCR 识别「视频号」
hrp.NewStep("处理青少年弹窗").
IOS().
TapByOCR("我知道了", hrp.WithIgnoreNotFoundError(true)),