diff --git a/src/cascadia/WindowsTerminal_UIATests/Init.cs b/src/cascadia/WindowsTerminal_UIATests/Init.cs index dec248167a2..ad46a8b642a 100644 --- a/src/cascadia/WindowsTerminal_UIATests/Init.cs +++ b/src/cascadia/WindowsTerminal_UIATests/Init.cs @@ -22,7 +22,12 @@ class Init public static void SetupAll(TestContext context) { Log.Comment("Searching for WinAppDriver in the same directory where this test was launched from..."); - string winAppDriver = Path.Combine(context.TestDeploymentDir, "WinAppDriver.exe"); + string winAppDriver = Path.Combine(context.TestDeploymentDir, "WinAppDriver", "WinAppDriver.exe"); + + if (!File.Exists(winAppDriver)) + { + winAppDriver = Path.Combine(context.TestDeploymentDir, "WinAppDriver.exe"); + } Log.Comment($"Attempting to launch WinAppDriver at: {winAppDriver}"); Log.Comment($"Working directory: {Environment.CurrentDirectory}"); diff --git a/src/cascadia/WindowsTerminal_UIATests/WindowsTerminal.UIA.Tests.csproj b/src/cascadia/WindowsTerminal_UIATests/WindowsTerminal.UIA.Tests.csproj index 589cb6f3af4..4bc9246e8fd 100644 --- a/src/cascadia/WindowsTerminal_UIATests/WindowsTerminal.UIA.Tests.csproj +++ b/src/cascadia/WindowsTerminal_UIATests/WindowsTerminal.UIA.Tests.csproj @@ -126,7 +126,7 @@ - copy "$(SolutionDir)\dep\WinAppDriver\*" "$(OutDir)\" + mkdir "$(OutDir)\WinAppDriver" 2>nul & copy "$(SolutionDir)\dep\WinAppDriver\*" "$(OutDir)\WinAppDriver\" - \ No newline at end of file + diff --git a/src/host/ft_uia/Host.Tests.UIA.csproj b/src/host/ft_uia/Host.Tests.UIA.csproj index 0a3c8dd13aa..222a3274d2d 100644 --- a/src/host/ft_uia/Host.Tests.UIA.csproj +++ b/src/host/ft_uia/Host.Tests.UIA.csproj @@ -149,7 +149,7 @@ - copy "$(SolutionDir)\dep\WinAppDriver\*" "$(OutDir)\" + mkdir "$(OutDir)\WinAppDriver" 2>nul & copy "$(SolutionDir)\dep\WinAppDriver\*" "$(OutDir)\WinAppDriver\" - \ No newline at end of file + diff --git a/src/host/ft_uia/Init.cs b/src/host/ft_uia/Init.cs index e6c7fae56c7..eb8b76cc923 100644 --- a/src/host/ft_uia/Init.cs +++ b/src/host/ft_uia/Init.cs @@ -28,7 +28,12 @@ class Init public static void SetupAll(TestContext context) { Log.Comment("Searching for WinAppDriver in the same directory where this test was launched from..."); - string winAppDriver = Path.Combine(context.TestDeploymentDir, "WinAppDriver.exe"); + string winAppDriver = Path.Combine(context.TestDeploymentDir, "WinAppDriver", "WinAppDriver.exe"); + + if (!File.Exists(winAppDriver)) + { + winAppDriver = Path.Combine(context.TestDeploymentDir, "WinAppDriver.exe"); + } Log.Comment($"Attempting to launch WinAppDriver at: {winAppDriver}"); Log.Comment($"Working directory: {Environment.CurrentDirectory}");