feat: cache screenshot ocr texts

This commit is contained in:
lilong.129
2023-04-28 11:27:18 +08:00
parent c0ea52d02a
commit 9981dad1f8
9 changed files with 56 additions and 35 deletions

View File

@@ -97,7 +97,7 @@
},
{
"method": "sleep",
"params": 10
"params": 5
},
{
"method": "screenshot"
@@ -109,7 +109,7 @@
},
{
"method": "sleep",
"params": 10
"params": 5
},
{
"method": "screenshot"

View File

@@ -37,8 +37,8 @@ func TestAndroidLiveSwipeTest(t *testing.T) {
SleepRandom(0, 5, 0.6, 5, 10, 0.4),
hrp.NewStep("向上滑动,等待 10s").
Android().
SwipeUp(uixt.WithIdentifier("第一次上划")).Sleep(10).ScreenShot(). // 上划 1 次,等待 10s截图保存
SwipeUp(uixt.WithIdentifier("第二次上划")).Sleep(10).ScreenShot(), // 再上划 1 次,等待 10s截图保存
SwipeUp(uixt.WithIdentifier("第一次上划")).Sleep(5).ScreenShot(). // 上划 1 次,等待 5s截图保存
SwipeUp(uixt.WithIdentifier("第二次上划")).Sleep(5).ScreenShot(), // 再上划 1 次,等待 5s截图保存
hrp.NewStep("exit").
Android().
AppTerminate("com.ss.android.ugc.aweme").