mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 03:36:44 +02:00
added WinAppDriver.exe
This commit is contained in:
41
src/modules/fancyzones/UITests-FancyZonesEditor/Init.cs
Normal file
41
src/modules/fancyzones/UITests-FancyZonesEditor/Init.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
namespace Microsoft.FancyZonesEditor.UITests
|
||||
{
|
||||
[TestClass]
|
||||
public class Init
|
||||
{
|
||||
private static Process? appDriver;
|
||||
|
||||
[AssemblyInitialize]
|
||||
public static void SetupAll(TestContext context)
|
||||
{
|
||||
string winAppDriver = Path.Combine($"{Environment.CurrentDirectory}", @".\..\..\..\..\..\deps\WinAppDriver", "WinAppDriver.exe");
|
||||
|
||||
context.WriteLine($"Attempting to launch WinAppDriver at: {winAppDriver}");
|
||||
context.WriteLine($"Working directory: {Environment.CurrentDirectory}");
|
||||
|
||||
appDriver = Process.Start(winAppDriver);
|
||||
}
|
||||
|
||||
[AssemblyCleanup]
|
||||
public static void CleanupAll()
|
||||
{
|
||||
try
|
||||
{
|
||||
appDriver?.Kill();
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user