Launching command line applications
Is it possible to launch a command line application?
I have tried various methods: Passing application path, Launching 'Terminal' and passing application path via send keys - WinAppDriver complains that it can't find a Handle to the application
Please describe your scenario. It depends on your language. For c# you can run cmd command using Process.Start, then attach to it by process name or app name
/// <summary>
/// Execute cmd command
/// <param name="command">Command text</param>
/// </summary>
public static void ExecuteCommand(string command)
{
var processInfo = new ProcessStartInfo("cmd.exe", "/K " + command)
{
CreateNoWindow = true,
UseShellExecute = true
};
Process.Start(processInfo);
}
`
I'm trying to run the command remotely either natively with Windows Application Driver, or via Appium - I'm agnostic to language at this stage, but have historical test code in Python
You should use your language abilities or some script like bat or PowerShell, not WinAppDriver
I second the comment from @Shakevg. Start the application using a batch file and then create a session on a opened window.