LeanFT Error trying to launch Flights GUI demo

Category:
Question ID: 109126
1
0

I’m using Visual Studio. Getting a NullReferenceException error when trying to launch the Flights GUI demo application from LeanFT. Here’s the code I’m trying to use:

IAut FlightsApp = Desktop.LaunchAut("C:\\\\Training\\\\Flights Application\\\\FlightsGUI.exe");

Marked as spam
Posted by (Questions: 382, Answers: 59)
Asked on July 30, 2019 3:47 pm
20 views
Answers (1)
0
Private answer

Try this code instead:

//Remember to include this 'using' statement
using System.Diagnostics;

//in your test method:
Process appProcess = new Process { StartInfo = { FileName = @''C:UsersAdministratorDesktopFlights ApplicationFlightsGUI.exe'' } };
appProcess.Start();

Marked as spam
Posted by (Questions: 16, Answers: 803)
Answered on July 30, 2019 3:47 pm
Awesome! That code worked perfectly! Thank you!!
( at July 30, 2019 3:48 pm)
EyeOnTesting