Files
elwig/Tests/E2ETests/WinAppDriver.cs
Lorenz Stechauner 6b48a1090c
All checks were successful
Test / Run tests (push) Successful in 2m35s
E2ETests: Refactor initial class structure
2024-07-07 14:35:54 +02:00

28 lines
951 B
C#

using System.Diagnostics;
namespace Tests.E2ETests {
public class WinAppDriver : IDisposable {
public const string WinAppDriverUrl = "http://127.0.0.1:4723";
private const string WinAppDriverPath = @"C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe";
private readonly Process WinAppDriverProcess;
public WinAppDriver() {
WinAppDriverProcess = Process.Start(new ProcessStartInfo(WinAppDriverPath) {
//UseShellExecute = true,
//Verb = "runas", // run as administrator
RedirectStandardInput = true,
EnvironmentVariables = {
// { "DX.UITESTINGENABLED", "1" },
}
})!;
}
public void Dispose() {
GC.SuppressFinalize(this);
WinAppDriverProcess.StandardInput.WriteLine("");
WinAppDriverProcess.Dispose();
}
}
}