From b83d659c32e6f2684a050181fea7e2bd6881a292 Mon Sep 17 00:00:00 2001 From: zhoujun62 Date: Tue, 29 Nov 2022 18:08:10 +0800 Subject: [PATCH] Slove SUB_AA_OpenHarmony_OnAndOffScreen_0500 and SUB_AA_OpenHarmony_OnAndOffScreen_0600 fail problem Signed-off-by: zhoujun62 --- .../entry/src/main/ets/test/OnAndOffScreenTest.test.ets | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ability/ability_runtime/actssupportfunction/actsonandoffscreentest/entry/src/main/ets/test/OnAndOffScreenTest.test.ets b/ability/ability_runtime/actssupportfunction/actsonandoffscreentest/entry/src/main/ets/test/OnAndOffScreenTest.test.ets index 8b1994eba..820829093 100644 --- a/ability/ability_runtime/actssupportfunction/actsonandoffscreentest/entry/src/main/ets/test/OnAndOffScreenTest.test.ets +++ b/ability/ability_runtime/actssupportfunction/actsonandoffscreentest/entry/src/main/ets/test/OnAndOffScreenTest.test.ets @@ -80,6 +80,7 @@ export default function OnAndOffScreenTest() { }) if (!status) { + await sleep(500) let cmd = "uinput -K -d 18 -u 18"; await executeShellCommand(cmd, TAG1); await slideScreen(TAG1); @@ -459,6 +460,7 @@ export default function OnAndOffScreenTest() { } if (data.event == onForeground2) { + await sleep(500) let cmd = "uinput -K -d 18 -u 18"; await executeShellCommand(cmd, TAG); } @@ -561,6 +563,7 @@ export default function OnAndOffScreenTest() { } if (data.event == onForeground2 && !flag) { + await sleep(500) let cmd = "uinput -K -d 18 -u 18"; await executeShellCommand(cmd, TAG); flag = true; @@ -576,6 +579,7 @@ export default function OnAndOffScreenTest() { } if (data.event == onBackground2) { + await sleep(500) let cmd = "uinput -K -d 18 -u 18"; await executeShellCommand(cmd, TAG); await slideScreen(TAG); -- GitLab