From 931e49dda765e4c9cdc28d7fc2efb396ec89e124 Mon Sep 17 00:00:00 2001 From: "Mengyuan Chen (from Dev Box)" Date: Thu, 17 Apr 2025 15:38:54 +0800 Subject: [PATCH] add performaction --- src/common/UITestAutomation/Session.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/common/UITestAutomation/Session.cs b/src/common/UITestAutomation/Session.cs index 715cd2cc08..e4ee6017e4 100644 --- a/src/common/UITestAutomation/Session.cs +++ b/src/common/UITestAutomation/Session.cs @@ -433,7 +433,10 @@ namespace Microsoft.PowerToys.UITest /// The key release. public void PressKey(Key key) { - KeyboardHelper.PressKey(key); + PerformAction(() => + { + KeyboardHelper.PressKey(key); + }); } /// @@ -442,7 +445,10 @@ namespace Microsoft.PowerToys.UITest /// The key to press and hold . public void ReleaseKey(Key key) { - KeyboardHelper.ReleaseKey(key); + PerformAction(() => + { + KeyboardHelper.ReleaseKey(key); + }); } ///