mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 11:46:30 +02:00
42 lines
1.1 KiB
C#
42 lines
1.1 KiB
C#
|
|
// 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
|
|||
|
|
{
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|