E2ETests: Refactor initial class structure
All checks were successful
Test / Run tests (push) Successful in 2m35s
All checks were successful
Test / Run tests (push) Successful in 2m35s
This commit is contained in:
27
Tests/E2ETests/WinAppDriver.cs
Normal file
27
Tests/E2ETests/WinAppDriver.cs
Normal file
@ -0,0 +1,27 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user