mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-11 18:11:21 +08:00
feat: check feed type and incr feed count
This commit is contained in:
@@ -28,7 +28,59 @@
|
||||
10,
|
||||
0.3
|
||||
],
|
||||
"target_count": 5
|
||||
"target_count": 5,
|
||||
"target_labels": [
|
||||
{
|
||||
"regex": true,
|
||||
"scope": [
|
||||
0,
|
||||
0.5,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"text": "^广告$"
|
||||
},
|
||||
{
|
||||
"regex": true,
|
||||
"scope": [
|
||||
0,
|
||||
0.5,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"text": "^图文$"
|
||||
},
|
||||
{
|
||||
"regex": true,
|
||||
"scope": [
|
||||
0,
|
||||
0.5,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"text": "^特效\\|"
|
||||
},
|
||||
{
|
||||
"regex": true,
|
||||
"scope": [
|
||||
0,
|
||||
0.5,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"text": "^模板\\|"
|
||||
},
|
||||
{
|
||||
"regex": true,
|
||||
"scope": [
|
||||
0,
|
||||
0.5,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"text": "^购物\\|"
|
||||
}
|
||||
]
|
||||
},
|
||||
"live": {
|
||||
"sleep_random": [
|
||||
|
||||
@@ -23,6 +23,13 @@ func TestAndroidVideoCrawlerTest(t *testing.T) {
|
||||
"app_package_name": "com.ss.android.ugc.aweme",
|
||||
"feed": map[string]interface{}{
|
||||
"target_count": 5,
|
||||
"target_labels": []map[string]interface{}{
|
||||
{"text": "^广告$", "scope": []float64{0, 0.5, 1, 1}, "regex": true},
|
||||
{"text": "^图文$", "scope": []float64{0, 0.5, 1, 1}, "regex": true},
|
||||
{"text": `^特效\|`, "scope": []float64{0, 0.5, 1, 1}, "regex": true},
|
||||
{"text": `^模板\|`, "scope": []float64{0, 0.5, 1, 1}, "regex": true},
|
||||
{"text": `^购物\|`, "scope": []float64{0, 0.5, 1, 1}, "regex": true},
|
||||
},
|
||||
"sleep_random": []float64{0, 5, 0.7, 5, 10, 0.3},
|
||||
},
|
||||
"live": map[string]interface{}{
|
||||
|
||||
@@ -214,7 +214,8 @@ func (wc *WorldCupLive) EnterLive(bundleID string) error {
|
||||
// 青少年弹窗处理
|
||||
if ocrTexts, err := wc.driver.GetScreenTextsByOCR(); err == nil {
|
||||
if points, err := ocrTexts.FindTexts([]string{"青少年模式", "我知道了"}); err == nil {
|
||||
_ = wc.driver.TapAbsXY(points[1].X, points[1].Y)
|
||||
point := points[1].Center()
|
||||
_ = wc.driver.TapAbsXY(point.X, point.Y)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user