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); + }); } ///