Repository: files-community/Files
File: tests/Files.InteractionTests/SessionManager.cs (C#)

Code before:
				if (exc.Message.Contains("Package was not found"))
				{
					appIdIndex++;
				}
				else
				{
					Console.WriteLine("Failed to update start driver, got exception:" + exc.Message);
				}
			}
		}

		[AssemblyInitialize]
		public static void CreateSession(TestContext _)
		{
			if (_session is null)
			{

				int timeoutCount = 50;

				tryInitializeSession();
				if (_session is null)
				{
					// WinAppDriver is probably not running, so lets start it!
					if (File.Exists($@"{Environment.GetEnvironmentVariable("SystemDrive")}\Program Files (x86)\Windows Application Driver\WinAppDriver.exe"))
					{
						Process.Start($@"{Environment.GetEnvironmentVariable("SystemDrive")}\Program Files (x86)\Windows Application Driver\WinAppDriver.exe");
					}
					else if (File.Exists($@"{Environment.GetEnvironmentVariable("SystemDrive")}\Program Files\Windows Application Driver\WinAppDriver.exe"))
					{
						Process.Start($@"{Environment.GetEnvironmentVariable("SystemDrive")}\Program Files\Windows Application Driver\WinAppDriver.exe");
					}
					else
					{
						throw new Exception("Unable to start WinAppDriver since no suitable location was found.");
					}

					Thread.Sleep(10000);
					tryInitializeSession();
				}

				while (_session is null && timeoutCount < 1000 * 4)
				{
					tryInitializeSession();
					Thread.Sleep(timeoutCount);
					timeoutCount *= 2;
				}

				Thread.Sleep(3000);
				Assert.IsNotNull(_session);
				Assert.IsNotNull(_session.SessionId);


Review comment (suggestion):
As above.
```suggestion
						Process.Start($@"{Environment.GetEnvironmentVariable("ProgramData(x86)")}\Windows Application Driver\WinAppDriver.exe");
```

Code after:
				if (exc.Message.Contains("Package was not found"))
				{
					appIdIndex++;
				}
				else
				{
					Console.WriteLine("Failed to update start driver, got exception:" + exc.Message);
				}
			}
		}

		[AssemblyInitialize]
		public static void CreateSession(TestContext _)
		{
			if (_session is null)
			{

				int timeoutCount = 50;

				tryInitializeSession();
				if (_session is null)
				{
					// WinAppDriver is probably not running, so lets start it!
					if (File.Exists($@"{Environment.GetEnvironmentVariable("ProgramFiles(x86)")}\Windows Application Driver\WinAppDriver.exe"))
					{
						Process.Start($@"{Environment.GetEnvironmentVariable("ProgramFiles(x86)")}\Windows Application Driver\WinAppDriver.exe");
					}
					else if (File.Exists($@"{Environment.GetEnvironmentVariable("ProgramFiles")}\Windows Application Driver\WinAppDriver.exe"))
					{
						Process.Start($@"{Environment.GetEnvironmentVariable("ProgramFiles")}\Windows Application Driver\WinAppDriver.exe");
					}
					else
					{
						throw new Exception("Unable to start WinAppDriver since no suitable location was found.");
					}

					Thread.Sleep(10000);
					tryInitializeSession();
				}

				while (_session is null && timeoutCount < 1000 * 4)
				{
					tryInitializeSession();
					Thread.Sleep(timeoutCount);
					timeoutCount *= 2;
				}

				Thread.Sleep(3000);
				Assert.IsNotNull(_session);
				Assert.IsNotNull(_session.SessionId);